So I understand that this isn’t everyones biggest concern but I would appreciate a bit of help here. I created a simple user library structure which sits next to the user folder in the form of:
with build, import and makefile all in the form of what I found in the ‘user’ folder. Calling make in the usrlib, usrlib-dynalib compiles and produces output in build/target/usrlib and build/target/usrlib-dynalib
So far so good, but creating the usrlib-part in ‘the style of’ user-part so it can be loaded onto the device is more challenging for me. As I understand it, the objective is to create a usrlib-part.bin which has the libusrlib-dynalib.a file linked/embedded. Correct?
I created modules/usrlib-part with inc and src folders - my first question deals with linker.ld in this folder. The respective user-part linker.ld contains:
APP_FLASH (rx) : ORIGIN = 0x080A0000, LENGTH = 128K
/* The SRAM Origin is system_part1_module_ram_end, and extends to
SRAM (rwx) : ORIGIN = 0x20000300, LENGTH = 0x20000 - 0x300 - 42K
I take it I should add to the user-part/linker.ld the following:
In my usrlib-part/linker.ld I have:
APP_FLASH (rx) : ORIGIN = 0x080E0000, LENGTH = 128K
/* todo - SRAM must start also at an offset after what has been reserved for system-module 1 */
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 768
I just borrowed these value from what I saw in system-part1/linker.ld, clearly this is not correct. What exactly should I set SRAM to?
I had to make a ton of changes of the varous makefiles (or created new ones) I have questions about those also but I don’t want to blow up this post too much…