-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H7 fixes 1 #5834
H7 fixes 1 #5834
Conversation
Nice, thanks @hydra. I'll merge this and do some fixes afterwards. |
ldr r3, = _efastram_bss | ||
cmp r2, r3 | ||
bcc FillZerofastram_bss | ||
/*-----*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing stack watermaking
/* Mark the heap and stack */
ldr r2, =_heap_stack_begin
b LoopMarkHeapStack
MarkHeapStack:
movs r3, 0xa5a5a5a5
str r3, [r2], #4
LoopMarkHeapStack:
ldr r3, = _heap_stack_end
cmp r2, r3
bcc MarkHeapStack
yup, there's bound to be some missing bits here and there, we'll likely find more as we do more testing. hopefully the stuff I have done are useful steps in the right direction. |
For H7 this results in warnings for `UNUSED` macro re-defined.
Generated code produces: ``` #ifdef USE_NAV && USE_AUTOTUNE_FIXED_WING ``` and the resulting error is: ``` Output: ./obj/main/SPRACINGH7EXTREME/tmp/test.cpp:112:16: warning: extra tokens at end of #ifdef directive 112 | #ifdef USE_NAV && USE_AUTOTUNE_FIXED_WING | ^~ ``` Solution appears to be to just use the second part of the condition.
Generated code was missing semicolon. Error was: ``` ./obj/main/SOMETARGET/tmp/test.cpp:53:13: error: expected ';' at end of member declaration 53 | int64_t v = V | ^ | ; ```
* Note also allows target.mk files to override the linker script, this is useful for development on H750 boards which actually have 1MB of flash, but only 128k manufacturer supported... e.g. in target.mk do this (with suitable linker script, of course) DEFAULT_LD_SCRIPT=$(LINKER_DIR)/stm32_flash_h750_1m.ld
Current state is that SPRACINGH7EXTREME target compiles, but does not link yet, using:
For the SPRACINGH7EXTREME target commits, see the branch in https://github.com/spracing/inav/tree/spracingh750-initial-support which is is the same as this branch with just the SPRACINGH7EXTREME target definition added. The code is obviously all untested, but it's progress! Many of the topics/commits covered in this PR were also found when doing the H7 work in BF so I'm familiar with many of them. Not quite sure how you want to handle the PR's for these commits... |
H7 libs define `FLASH_SIZE`. This uses `TARGET_FLASH_SIZE` instead, as per BF.
This needs further work.
* Untested.
* This is useful when porting new new MCUs. * See betaflight/betaflight#8376 * Pre-requisite to supporting config in external flash and on SD card.
Note: Full RCC support not ported yet.
support has not been implemented.
* CONFIG_IN_FLASH cannot be used with this as there is only one flash sector - Use a different config storage system.
I'll merge this and continue on the main branch |
cool! not sure it was the best idea to squash all the commits, probably was worth cherry-picking some commits and squashing the rest. But great to see more progress on this today. Can you get someone at Matek to send me one of their new H7 boards to me? |
No description provided.