We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello everyone!
I'm trying to create project which contains a drivers library and two separate application (Booltloader + app), now I want to share the drivers library between the two apps in order to save space on the flash...
I saw this tutorial for IAR(https://www.iar.com/support/resources/articles/checksum-protected-library-using-iar-embedded-workbench-for-arm/) but I must use Keil uvision5 and I didnt find anything helpful online.
Anyone can guide me through this?
thanks!
Hello Robi123
I'm trying UART using RTX5 on EKTM4c1294XL and trying to do the same in Keil V5 but not able to do so. To use Keil V5 really having tough time i must say.
I think you can get a long way toward what you want just following the IAR notes, translating where needed. Meaning: look at the Keil documentation for the functionality in each step of the IAR app note.
In Keil, I created a shareable library as a library build (IAR made it an executable). I didn't use global or static variables (per the IAR recommendation), to avoid having to initialize them. So that could yet be a showstopper.
I added __atrribute__((used)) to each library function declaration so that the linker keeps them, and used a custom scatter file to position the application and library in known locations. The IAR app note added a checksum. I didn't look at that yet.
The simple app works in the simulator -- haven't tried on a real device.
The Keil IDE doesn't seem to handle dependencies as well as say, Visual Studio. Meaning that specifying the library location is more manual than you might like and build ordering isn't automagically handled.
Thx for the answer! I'll try that! BTW, is this possible also with CPP code? I mean will I be able to create an instance of a class that I declared in the librrary, in the "main" applicatication?