Skip to content
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

Merged
merged 42 commits into from
Jun 18, 2020
Merged

H7 fixes 1 #5834

merged 42 commits into from
Jun 18, 2020

Conversation

hydra
Copy link
Contributor

@hydra hydra commented Jun 9, 2020

No description provided.

@digitalentity
Copy link
Member

Nice, thanks @hydra. I'll merge this and do some fixes afterwards.

ldr r3, = _efastram_bss
cmp r2, r3
bcc FillZerofastram_bss
/*-----*/
Copy link
Member

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

@hydra
Copy link
Contributor Author

hydra commented Jun 9, 2020

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.

hydra added 18 commits June 10, 2020 19:28
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
@hydra
Copy link
Contributor Author

hydra commented Jun 10, 2020

Current state is that SPRACINGH7EXTREME target compiles, but does not link yet, using:

make TARGET=SPRACINGH7EXTREME DEBUG=INFO V=1 TARGET_FLASH_SIZE=1024

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...

@digitalentity
Copy link
Member

I'll merge this and continue on the main branch

@digitalentity digitalentity merged commit 7eb95ce into iNavFlight:de_h7_basic_support Jun 18, 2020
@hydra
Copy link
Contributor Author

hydra commented Jun 18, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants