kinetis/ldscript: handle _rom_offset#11630
Conversation
- To be able to flash at an offset the vector table must be relocated accordingly to the IMAGE_OFFSET, therefore linkage needs to take the offset into account.
- _rom_start_addr, _ram_start_addr, _rom_length and _ran_length are already defined in cortexm_common/Makefile.included and can therefore be removed from kinetis/Makefile.include - _ram_base_addr is never used and was not in commit history so is also removed
|
Edited the description, |
|
Note also, the commit order on github is not the real one. It is needed to check the local one for reviewing. |
There was a problem hiding this comment.
ACK ran the described tests (also ran by CI as they are compile time tests).
I agree with the changes and justification.
I could still use tests/riotboot on iotlab-m3 and samr21-xpro.
And tests/riotboot indeed work with #11562 on frdm-kw41z and frdm-k64f.
Note on the kinetis.ld with an offset the .fcfield will not be at 0x400 so generating it and the linker scripts checks are useless. However I agree with the current handling to not use a different linker script when using an offset even if the check and .fcfield is not needed there.
|
@cladmi Thanks for the Review! |
Contribution description
This PR includes ROM_OFFSET handling for kinetis boards. This is a required step to be able to flash and link at an offset so
riotbootcan be used (among others). With this PRtests/cortexm_common_ldscriptpases on kinetis platforms and is therefor whitelisted.Testing procedure
Run
tests/cortexm_common_ldscripton kinetis based boards:BOARD=frdm-kw41z make -C tests/cortexm_common_ldscript/Run
tests/cortexm_common_ldscripton boards that where already whtelisted (CI should check this anyway):BOARD=samr21-xpro make -C tests/cortexm_common_ldscript/Issues/PRs references
#11562 depends on it.