Skip to content

MBED_16 is not working on STM32F4 with IAR toolchain #2027

Closed
@adustm

Description

@adustm

Hello,
We noticed that the MBED_16 is failing with IAR toolchain at least for STM32F4 and STM32L4 families
it gives the following result:

Executing 'python host_test.py -d D: -f "c:\MCDGitW601\mbed\build\test\NUCLEO_F410RB\IAR\MBED_16\rtc.bin" -p COM7 -t 15 -C 1.5 --auto -m NUCLEO_F410RB'
Test::Output::Start
MBED: Instrumentation: "COM7" and disk: "D:"
HOST: Copy image onto target...
        1 file(s) copied.
HOST: Initialize serial port...
Looking for NUCLEO_F410RB with MBEDLS
...port ready!
HOST: Reset target...
HOST: Property 'timeout' = '20'
HOST: Property 'host_test_name' = 'rtc_auto'
HOST: Property 'description' = 'RTC'
HOST: Property 'test_id' = 'MBED_16'
HOST: Start test...
MBED: [1256729737] [2009-10-28 11:35:37 AM]
HOST: [1256729737] [2009-10-28 11:35:37 AM] received time +1256729737 sec after 0.00 sec... OK
MBED: [1256726138] [2009-10-28 10:35:38 AM]
HOST: [1256726138] [2009-10-28 10:35:38 AM] received time -3599 sec after 0.00 sec... FAIL
MBED: [1256729739] [2009-10-28 11:35:39 AM]
HOST: [1256729739] [2009-10-28 11:35:39 AM] received time +3601 sec after 0.00 sec... OK
MBED: [1256729740] [2009-10-28 11:35:40 AM]
HOST: [1256729740] [2009-10-28 11:35:40 AM] received time +1 sec after 0.00 sec... OK
MBED: [1256729741] [2009-10-28 11:35:41 AM]
HOST: [1256729741] [2009-10-28 11:35:41 AM] received time +1 sec after 0.00 sec... OK

{{failure}}
{{end}}
Test::Output::Finish
TargetTest::NUCLEO_F410RB[F63D]::IAR::MBED_16::RTC [FAIL] in 5.41 of 20 sec
Test summary:
+--------+---------------------+-----------+---------+------------------+--------------------+---------------+-------+
| Result | Target              | Toolchain | Test ID | Test Description | Elapsed Time (sec) | Timeout (sec) | Loops |
+--------+---------------------+-----------+---------+------------------+--------------------+---------------+-------+
| OK     | NUCLEO_F410RB[F63D] | uARM      | MBED_16 | RTC              |        5.43        |       20      |  1/1  |
| FAIL   | NUCLEO_F410RB[F63D] | IAR       | MBED_16 | RTC              |        5.41        |       20      |  0/1  |
| OK     | NUCLEO_F410RB[F63D] | ARM       | MBED_16 | RTC              |       22.07        |       20      |  1/1  |
| OK     | NUCLEO_F410RB[F63D] | GCC_ARM   | MBED_16 | RTC              |        5.51        |       20      |  1/1  |
+--------+---------------------+-----------+---------+------------------+--------------------+---------------+-------+
Result: 1 FAIL / 3 OK

Adding the following line in rtc_read function of hal/targets/hal/TARGET_STM/TARGET_STMF4/rtc_api.c fixes the issue:
timeinfo.tm_isdst = -1;

Basically I would say that I am happy with this bug fix. But why is the issue toolchain dependent ?
I reverted the database and discovered that the issue appeared at the merge of PR#1863.
I cannot find the link between the modification and the failure, neither between the bug fix I suggest and the failure on IAR toolchain only...
Do you have any idea ?
Kind regards
Armelle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions