Skip to content

[Cortex_M7] fpu with single/double precision - bugfix and extension #1950

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

Closed
wants to merge 12 commits into from

Conversation

ohagendorf
Copy link
Contributor

@ohagendorf ohagendorf commented Jun 15, 2016

This is an continuative work of PR #1909 and is a suggestion to discuss the problem of two different Cortex M7 variants: with single or with double precision fpu. Please have a look at the last commit. The other commits are from #1909.

  • creating new core name Cortex_M7F_DP for a target with a double precision fpu
  • adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json; curent state: every Cortex_M7F is configured with single precision fpu
  • up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
  • changing gcc.py to use single precision for Cortex-M7F und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 15, 2016

Can you please clean this patch, it contains lot of changes that are unrelated ?

@ohagendorf
Copy link
Contributor Author

ohagendorf commented Jun 15, 2016

The reason is that it is build on top of PR #1909. The commits of it are included here because it is not yet merged.

If you want, I can close this and wait until the PR is merged and submit it again.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 15, 2016

OK lets first integrate that one, and then rebase this one and review

ohagendorf added 12 commits July 1, 2016 15:10
PR ARMmbed#1881 renamed option in targets.json - this commit is doing the same with the new target
- changing device.h -> targets.json after rebase
- adding startup and config files for ARM_STD toolchain
- changing all STM32F7xx targets to ARM as default toolchain (instead of uARM before)
test results:
Test summary:
+--------+---------------+-----------+-------------+---------------------------------------+--------------------+---------------+-------+
| Result | Target        | Toolchain | Test ID     | Test Description                      | Elapsed Time (sec) | Timeout (sec) | Loops |
+--------+---------------+-----------+-------------+---------------------------------------+--------------------+---------------+-------+
| OK     | NUCLEO_F767ZI | GCC_ARM   | DTCT_1      | Simple detect test                    |        0.53        |       10      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | EXAMPLE_1   | /dev/null                             |        5.78        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_10     | Hello World                           |        0.37        |       5       |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_11     | Ticker Int                            |       11.39        |       15      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_12     | C++                                   |        1.41        |       10      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_16     | RTC                                   |        4.57        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_2      | stdio                                 |        0.79        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_23     | Ticker Int us                         |       11.37        |       15      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_24     | Timeout Int us                        |       11.41        |       15      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_25     | Time us                               |        11.4        |       15      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_26     | Integer constant division             |        1.41        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_34     | Ticker Two callbacks                  |       11.41        |       15      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_37     | Serial NC RX                          |        10.9        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_38     | Serial NC TX                          |       15.38        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_A1     | Basic                                 |        1.34        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_A21    | Call function before main (mbed_main) |        1.45        |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_A9     | Serial Echo at 115200                 |        6.5         |       20      |  1/1  |
| OK     | NUCLEO_F767ZI | GCC_ARM   | MBED_BUSOUT | BusOut                                |        2.28        |       15      |  1/1  |
+--------+---------------+-----------+-------------+---------------------------------------+--------------------+---------------+-------+
Result: 18 OK

Completed in 174.85 sec
- creating new core name Cortex_M7F_DP for a target with a double precision fpu
- adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json
- up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
- changing gcc.py to use single precision for Cortex-M7 und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

- iar.py need a similar extention - I didn't change that yet because
  - did not run at the moment - python exception
  - currently worked on in PR ARMmbed#1948
@ohagendorf ohagendorf force-pushed the stm32f7_fpu_sp_dp branch from 557243e to e8239e0 Compare July 1, 2016 14:27
@ohagendorf
Copy link
Contributor Author

I'm closing this and will reopen it to clean up the commits.

@ohagendorf ohagendorf closed this Jul 1, 2016
@ohagendorf ohagendorf deleted the stm32f7_fpu_sp_dp branch July 1, 2016 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants