Skip to content

[EXPORT] commandline options for export_test.py similar to build.py #526

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

Conversation

ohagendorf
Copy link
Contributor

This is a suggestion to use the tool export_test.py in a similar way like e.g. build.py. The reason to change the behaviour was the development of an gcc_arm toolchain/exporter for Nucleo_F334. The hal of this board currently does not allow to link with the rtos library. Both define a SysTick_Handler.
With command line options, similar to build.py, the export can be limited now to specific toolchains, targets and/or export projects.
Without a command line option the behaviour is the same as before.

Here are the options:

Usage: export_test.py [options]

Options:
-h, --help show this help message and exit
-a, --all export all projects and MCU to all toolchains
-m MCU, --mcu=MCU
export for the given MCU (ARCH_PRO, DISCO_F051R8, ... STM32F407)
-t TOOLCHAIN, --tool=TOOLCHAIN
export to the given TOOLCHAIN (codesourcery, coide, ... uvision)
-p PROJECT, --project=PROJECT
export the given PROJECT (MBED_BLINKY, RTOS_MBED_BASIC)

Usage: export_test.py [options]

Options:
-h, --help            show this help message and exit
-a, --all             export all projects and MCU to all toolchains
-m MCU, --mcu=MCU     export for the given MCU (ARCH_PRO, DISCO_F051R8,
... STM32F407)
-t TOOLCHAIN, --tool=TOOLCHAIN
export to the given TOOLCHAIN (codesourcery, coide, ... uvision)
-p PROJECT, --project=PROJECT
export the given PROJECT (MBED_BLINKY, RTOS_MBED_BASIC)
ohagendorf added a commit to ohagendorf/mbed-os that referenced this pull request Oct 3, 2014
- rtos library is not working because of double defined SysTick_Handler
in system_stm32f3xx.c and in rtos
- please see pullrequest ARMmbed#526 for a correct export
- tests are working fine:
Test summary:

+--------+---------------+-----------+-----------+---------------------------------------+--------------------+---------------+-------+
| Result | Target        | Toolchain | Test ID   | Test Description
| Elapsed Time (sec) | Timeout (sec) | Loops |

+--------+---------------+-----------+-----------+---------------------------------------+--------------------+---------------+-------+
| OK     | NUCLEO_F334R8 | GCC_ARM   | DTCT_1    | Simple detect test
|        0.44        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | EXAMPLE_1 | /dev/null
|        3.37        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_10   | Hello World
|        0.37        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_11   | Ticker Int
|       11.31        |       20      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_12   | C++
|        1.32        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_16   | RTC
|        4.7         |       15      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_2    | stdio
|        0.76        |       20      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_23   | Ticker Int us
|       11.37        |       15      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_24   | Timeout Int us
|       11.41        |       15      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_25   | Time us
|       11.31        |       15      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_26   | Integer constant
division             |        1.32        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A1   | Basic
|        1.32        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A21  | Call function before
main (mbed_main) |        1.31        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A5   | DigitalIn DigitalOut
|        1.31        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A6   | DigitalInOut
|        1.31        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A7   | InterruptIn
|        9.31        |       10      |  1/1  |
| OK     | NUCLEO_F334R8 | GCC_ARM   | MBED_A9   | Serial Echo at 115200
|        5.97        |       10      |  1/1  |

+--------+---------------+-----------+-----------+---------------------------------------+--------------------+---------------+-------+
Result: 17 OK

Completed in 125.02 sec
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 13, 2014

Hi,

isn't export_test redundant script file? I believe the same functionality (even more developed) is provided by project.py script file, isn't it?

@ohagendorf
Copy link
Contributor Author

Hi,
yes, you are right. I just had a look into the code and it looks like export_test is redundant. I found at first the export_test script and used that all the time without knowing that there is a second, better tool.
Perhaps we can remove it and write a readme for the workspace_tool folder. I can start with that. But it would be good if a native speaker can check it.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 22, 2014

I propose to merge this and as the second step - to remove export_test if people agree that project.py it's the default script to export a project.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 9, 2014

Hi, this has been pending for a while , sorry about that. I started resolving conflicts, but was pre-empted by other tasks.

I'll close this. Thanks for understanding.

@0xc0170 0xc0170 closed this Dec 9, 2014
d-kato pushed a commit to d-kato/mbed-os that referenced this pull request Feb 15, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes ARMmbed#526.
SenRamakri pushed a commit to SenRamakri/mbed-os that referenced this pull request Feb 20, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes ARMmbed#526.
0xc0170 pushed a commit to 0xc0170/mbed-os that referenced this pull request Feb 22, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes ARMmbed#526.
0xc0170 pushed a commit that referenced this pull request Feb 22, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes #526.
SenRamakri pushed a commit that referenced this pull request Feb 28, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes #526.
AriParkkila pushed a commit to AriParkkila/mbed-os that referenced this pull request Mar 12, 2019
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes ARMmbed#526.
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.

2 participants