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

ST-DISCO_L475VG_IOT01A: Improve SRAM use for IAR toolchain #5844

Merged
merged 1 commit into from Jan 23, 2018

Conversation

Projects
None yet
5 participants
@adustm
Member

adustm commented Jan 12, 2018

Description

DISCO_L475VG_IOT01A has 128 k of SRAM (32k in SRAM2 + 96k in SRAM1)
At the moment, for IAR toolchain, SRAM2 only contains the nvic vector.
With this PR:
Use the entire SRAM2 with NVIC buffer + stack
Increase HEAP size to 0x10000 in SRAM1
Increase the available SRAM1 by 0x2000

Status

READY

Todos

  • Tests

Steps to test or reproduce

I'm working on the wifi driver and I've had memory mapping issues with mbed-tls-client example

Improve SRAM use for IAR toolchain
  Use the entire SRAM2 with NVIC buffer + stack
  Increase HEAP size to 0x10000 in SRAM1
  Increase the available SRAM1 by 0x2000
@adustm

This comment has been minimized.

Member

adustm commented Jan 12, 2018

Local test report:

+-------------------------+---------------------+------------------------------------------------------------------------------+--------+--------------------+-------------+
| target                  | platform_name       | test suite                                                                   | result | elapsed_time (sec) | copy_method |
+-------------------------+---------------------+------------------------------------------------------------------------------+--------+--------------------+-------------+
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-basic_test                        | OK     | 15.93              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-basic_test_default                | OK     | 15.83              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_async_validate               | OK     | 17.61              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_control_async                | OK     | 23.88              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_control_repeat               | OK     | 17.91              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_selection                    | OK     | 15.77              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_setup_failure                | OK     | 16.24              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-case_teardown_failure             | OK     | 16.29              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-control_type                      | OK     | 16.61              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-minimal_async_scheduler           | OK     | 16.74              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-minimal_scheduler                 | OK     | 17.33              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-test_assertion_failure_test_setup | OK     | 15.54              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-test_setup_case_selection_failure | OK     | 15.63              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-frameworks-utest-tests-unit_tests-test_setup_failure                | OK     | 15.24              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-tests-filesystem-heap_block_device                                  | OK     | 17.52              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-tests-filesystem-mbr_block_device                                   | OK     | 16.83              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | features-tests-filesystem-util_block_device                                  | OK     | 16.3               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-events-queue                                                           | OK     | 23.17              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-events-timing                                                          | OK     | 76.27              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-integration-basic                                                      | OK     | 14.85              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-c_strings                                                 | OK     | 17.67              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-dev_null                                                  | OK     | 16.85              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-echo                                                      | OK     | 17.72              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-flashiap                                                  | OK     | 16.22              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-generic_tests                                             | OK     | 16.13              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-lp_ticker                                                 | OK     | 22.15              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-lp_timeout                                                | OK     | 24.96              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-lp_timer                                                  | OK     | 20.59              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-race_test                                                 | OK     | 17.1               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-rtc                                                       | OK     | 26.11              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-sleep_lock                                                | OK     | 15.8               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-stats                                                     | OK     | 16.26              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-stl_features                                              | OK     | 16.4               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-ticker                                                    | OK     | 44.85              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-timeout                                                   | OK     | 27.1               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_drivers-timer                                                     | OK     | 23.37              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_functional-callback                                               | OK     | 17.55              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_functional-callback_big                                           | OK     | 17.58              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_functional-callback_small                                         | OK     | 17.46              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_functional-functionpointer                                        | OK     | 15.9               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-flash                                                         | OK     | 17.05              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-lp_ticker                                                     | OK     | 24.66              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-lp_us_tickers                                                 | OK     | 17.16              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-rtc_time                                                      | OK     | 17.49              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-rtc_time_conv                                                 | OK     | 38.69              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-sleep_manager                                                 | OK     | 15.47              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-sleep_manager_racecondition                                   | OK     | 23.6               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_hal-ticker                                                        | OK     | 27.55              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbed_platform-singletonptr                                             | OK     | 15.71              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-mbed-attributes                                              | OK     | 17.55              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-mbed-call_before_main                                        | OK     | 14.79              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-mbed-cpp                                                     | OK     | 14.94              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-mbed-div                                                     | OK     | 14.91              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-mbed-static_assert                                           | OK     | 15.38              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-basic                                              | OK     | 27.05              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-circularbuffer                                     | OK     | 21.76              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-condition_variable                                 | OK     | 16.24              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-event_flags                                        | OK     | 19.42              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-heap_and_stack                                     | OK     | 16.33              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-mail                                               | OK     | 21.12              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-malloc                                             | OK     | 36.66              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-memorypool                                         | OK     | 23.31              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-mutex                                              | OK     | 20.39              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-queue                                              | OK     | 19.0               | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-rtostimer                                          | OK     | 18.41              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-semaphore                                          | OK     | 20.61              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-signals                                            | OK     | 22.81              | default     |
| DISCO_L475VG_IOT01A-IAR | DISCO_L475VG_IOT01A | tests-mbedmicro-rtos-mbed-threads                                            | OK     | 32.07              | default     |
+-------------------------+---------------------+------------------------------------------------------------------------------+--------+--------------------+-------------+
place in SRAM1_region { readwrite, block STACKHEAP };
place in SRAM2_region { };
place in SRAM1_region { readwrite, block HEAP };
place in SRAM2_region { block CSTACK };

This comment has been minimized.

@bcostm

bcostm Jan 12, 2018

Contributor

I'm not sure but shouldn't we add the readwrite keyword ?

This comment has been minimized.

@adustm

adustm Jan 15, 2018

Member

Hello @bcostm Bruno
Your suggestion seemed good to me, but it does not link
It gives a long list of ambigous section match like this one
Error[Lc037]: ambiguous section match: "zi section .bss in main.o" matches more than one pattern "rw" (at line 36 of "C:/MCDGit7/mbed-os/BUILD/tests/DISCO_L475VG_IO T01A/IAR/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4 75xG/device/TOOLCHAIN_IAR/stm32l475xx.icf") "rw" (at line 37 of "C:/MCDGit7/mbed-os/BUILD/tests/DISCO_L475VG_IO T01A/IAR/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4 75xG/device/TOOLCHAIN_IAR/stm32l475xx.icf")
Is there any reason for asking this extra readwrite keyword ?

Cheers
Armelle

This comment has been minimized.

@0xc0170

0xc0170 Jan 22, 2018

Member

That is correct, readwrite specifies: Place .data, .bss, and .noinit. Therefore the linking error

It is good as it is

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jan 22, 2018

/morph build

1 similar comment
@cmonr

This comment has been minimized.

Contributor

cmonr commented Jan 22, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Jan 22, 2018

Build : SUCCESS

Build number : 909
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5844/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jan 22, 2018

Odd build failure, appears to be unrelated to PR.

Relaunching uvisor test.
/morph uvisor-test

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jan 23, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit f1cf77f into ARMmbed:master Jan 23, 2018

19 checks passed

ARM mbed CI Verification build successful.
Details
AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-RENESAS Local mbed2-RENESAS testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the ready for merge label Jan 23, 2018

@adustm adustm deleted the adustm:DiscoIot_L475_iarlink branch Jan 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment