-
Notifications
You must be signed in to change notification settings - Fork 3k
[Keil5] several configs for STM32xxx targets #1816
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
Conversation
To test this you need PR #1829 or a NDEBUG define. |
Anything news about this? |
Create an issue for this please if there's is not yet. A target which has >= 64k Flash should use ARM lib. Therefore I dont think some changes here for devices like F4/F7 what we want. uARM is not thread safe, limited functionality. However, you haven't changed default toolchain,just providing aligned exporters. I'll have closer look this weekend, and will get back. cc @sg- |
Please rebase |
8f02b1c
to
2cb1e5d
Compare
It's rebased. I'll check the ARM lib problem later again to describe it in an issue. |
Maybe using the default_toolchain option in targets.json would ease the configuration:
With this we wouldn't need any prog_gen option for Keil5 in targets.json except for a non default functionality e.g. for the NUCLEO_F042 which needs a specific uvision template. |
Yes that would be better ! but with recent flags consolidation, I believe microlib is set by default via misc options, and template is not needed anymore, worth trying. I haven't got time to test this, but uARM targets add --microlib + one define to the flags, thus should be active. |
looks fine to me, as stated in the first message, targets >=64k flash should use ARM and fix those targets cc @bcostm |
Yes, this was already raised in Issue #1536 but nothing has been clearly decided. If we do this it will solve the RTOS+InterruptIn Issue #1737 cc @screamerbg |
Sorry for causing the conflicts in this PR, we merged the microlib template cleanup, can you rebase on top of master? To apply only the new template you are introducing? |
- adding uvision5 configs to several STM32xx targets - all configs are tested through exporting BLINKY + additional printf() to Keil5, compiling und flashing - everything was OK - additional template with enabled option Use Cross-Compile Optimization (NUCLEO_F042 can't be used without this option because flash is too small) Please see PR ARMmbed#1745: That pull request was closed because the changes in targets.py/targets.json. This PR is the same but using the new format. @0xc0170 asked for a change to ARM instead of uARM. That is not possible because: - scatter file for ARM is not correct - after changing the scatter file using the uARM as a guideline the projects are not running - so changing to ARM should be a future work
- rebasing - removing all uvision5 entries from targets.json - except for nucleo_f042 - it needs an own uvision5 template
2cb1e5d
to
0503082
Compare
No problem. |
Thanks for the rebase. It's fine to add that cross optimization, however I would wonder why this special flag is required. It's not used by scripts (it's project thing), will an app fit then? To the uARM option, this does not solve the real issue with ARM. I would not change the default toolchain for those F4/F7 to uARM , not only size but also the thread safety, as there were latest changes, for uARM you can use just one thread.
Is this issue created and tracked? @bcostm @adustm Can you have a look? If this can get fixed, this PR would remove that uARM changes. |
I think the scatter file problem was my own failure. I had it several times but can't reproduce it any longer since a couple of days. And I don't know what it was. When the cross optimization flag is set the ide will compile and link several times to optimize the binary size. In this case it builds the app three times. Without the flag we got an binary size error. I used only the project.py export to uvision5. One of our PhD students and I, we had this problem since several months. But when I'm checking it now, everything is OK: when building with build.py/make.py and also when exporting with project.py. Maybe the huge amount of changes during the last weeks after my first PR solved the size problem. I introduced uARM as default toolchain because with ARM toolchain the projects didn't run. That is already solved for the F7xx targets in PR #1909 I'm not sure if it is solved also for F4xx targets but currently all F4xx targets use uARM. In PR #1909 the toolchain is set to ARM. But nevertheless all NUCLEO and DISCO entries in target.json have an default_toolchain option except both F7 and the DISCO_F407 target. So it seems that only the default toolchain for DISCO_F407 is remaining usefull in this PR. Everything else is gone away. |
Some good news, will you rebase it then ? If you find the issues with ARM, please create a new issue. we rather fix it than changing the toolchain. uARM can be used as it's supported but not in the online IDE by default for those "huge" targets |
I didn't rebased but removed everything except the DISCO_F407 default_toolchain. Rebasing seems not necessary. I'll check the uARM/ARM problem with F4xx targets and submit an issue when necessary. |
What's wrong with DISCO_F407VG and ARM? sorry for having so many questions |
I used uARM because all F4 targets use uARM. And several weeks ago projects with ARM didn't run when using a stdio printf.
|
Thanks ! we can close this as by default , ARM is set. Feel free to close this, and submit patches for ARM |
Please see PR #1745: That pull request was closed because the changes in targets.py/targets.json. This PR is the same but using the new format.
@0xc0170 asked for a change to ARM instead of uARM. That is not possible because: