-
Notifications
You must be signed in to change notification settings - Fork 99
hal: k20 - flash config section addition #217
Conversation
LGTM. Just get @bgamari to confirm it all looks fine on his toolchain. |
I'll test it when I get home. I am a bit worried, however, that k20's |
All kinetis device would be out of sync. I believe there are other chips which have some specific sections, so would need to override generic layout. Like this kinetis targets and I recall also lpc1768 has two ram AHBSRAM0/1. I'll look at linkers commands if there's anything we can leverage. |
Just another instance where a more flexible linker would be useful. I think
|
@bharrisau yes, there are plenty of space, mainly for cortex m0 kinetis devices which have just dozen of vectors, thus I used to place there some code to fill that gap. Can you elaborate on "another instance"? |
There's really nothing we can do, layout_common is "common" just to some extent, I don't think it's possible to |
We could use a preprocessor to generate our linker scripts. If I'm not mistaken libopencm3 does something along these lines. |
I propose to create an issue for generic ld, where we can continue discussing it? And can add a comment to K20 ld or TODO as I noticed are used in this project. @bgamari looks like they do https://github.com/libopencm3/libopencm3/blob/master/ld/linker.ld.S |
@0xc0170 by the way, I got home a bit late last night to check the patch. Tonight I'm going to make an effort to get home before 23:00 and do some testing. Concerning OpenOCD's behavior, the code that you cite certainly suggests that overlapping sections are handled properly. I wonder what was causing the behavior I observed earlier? I was flashing the |
Any progress here? Shall it be merged, to fix FCG config ? Another pull request #219 vectors, is refactoring isr vectors for k20, I would like to see there FCG included. 😄 |
Quite sorry about the rather ridiculous review period. Seems to work on my end. @0xc0170 thanks for working this out! |
hal: k20 - flash config section addition
This is as I described in #212. Tested with pyOCD and binary mbed cmsis-dap interface (binary flashing)