Skip to content

Update MTS_MDOT_F411RE target and remove bootloader from tools #12765

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

Merged
merged 6 commits into from
Apr 16, 2020

Conversation

theckmts
Copy link
Contributor

@theckmts theckmts commented Apr 6, 2020

Summary of changes

Removes MTS_MDOT_F411RE bootloader from tools/bootloaders and modifies the MTS_MDOT_F411RE definition in targets/targets.json so a bootloader can be specified in mbed_app.json and merged with an application using mbed cli tools.

This change is needed so the MDot bootloader can be maintained independantly of mbed-os and allow users to choose their own bootloader.

Impact of changes

Existing projects targeting MTS_MDOT_F411RE that want to continue using the MTS bootloader will need to be modified to include it in their configuration settings.

Migration actions required

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Tested compiling with GCC_ARM, ARMC6, and IAR compilers using mbed cli tools.

For each compiler, verified bootloader is merged with application, application runs as expected, and bootloader version is correct.

mbed_app.json

{
	"target_overrides": {
        "MTS_MDOT_F411RE": {
            "target.app_offset": "0x10000",
            "target.bootloader_img": "bootloader/mdot-bootloader_v0.1.6-11-gd087115.bin"
        },
}

GCC_ARM compiler output

>mbed compile -m MTS_MDOT_F411RE -t GCC_ARM --source . --source ..\mts-mbed-os
[Warning] @,: Compiler version mismatch: Have 6.3.1; expected version >= 9.0.0 and < 10.0.0
Building project blinky (MTS_MDOT_F411RE, GCC_ARM)
Scan: blinky
Scan: mts-mbed-os
Using ROM regions bootloader, application in this build.
  Region bootloader: size 0x10000, offset 0x8000000
  Region application: size 0x70000, offset 0x8010000

...

Link: blinky
Elf2Bin: blinky
Merging Regions
  Filling region bootloader with C:\Users\theck\Documents\mbed\blinky\bootloader/mdot-bootloader_v0.1.6-11-gd087115.bin
  Filling region application with .\BUILD\MTS_MDOT_F411RE\GCC_ARM\blinky_application.bin
Space used after regions merged: 0x1e750
Merging Regions
  Filling region application with .\BUILD\MTS_MDOT_F411RE\GCC_ARM\blinky_application.bin
Space used after regions merged: 0xe750
| Module                 |        .text |      .data |        .bss |
|------------------------|--------------|------------|-------------|
| [fill]                 |     132(+44) |      8(+0) |      24(+7) |
| [lib]\c.a              |    27364(+0) |   2472(+0) |      89(+0) |
| [lib]\gcc.a            |     3168(+0) |      0(+0) |       0(+0) |
| [lib]\misc             |      224(+0) |      4(+0) |      28(+0) |
| main.o                 |      276(+8) |      0(+0) |    184(+32) |
| mts-mbed-os\components |    110(+110) |      0(+0) |       0(+0) |
| mts-mbed-os\drivers    |     850(-36) |      0(+0) |       0(+0) |
| mts-mbed-os\hal        |   1422(+124) |      4(+0) |      66(+0) |
| mts-mbed-os\platform   |   4784(+274) |    260(+0) |    436(+72) |
| mts-mbed-os\rtos       |  6872(+6872) |  168(+168) | 5973(+5973) |
| mts-mbed-os\targets    |   6122(+656) |      4(+0) |   792(+476) |
| Subtotals              | 51324(+8052) | 2920(+168) | 7592(+6560) |
Total Static RAM memory (data + bss): 10512(+6728) bytes
Total Flash memory (text + data): 54244(+8220) bytes

Update Image: .\BUILD\MTS_MDOT_F411RE\GCC_ARM\blinky_update.bin
Image: .\BUILD\MTS_MDOT_F411RE\GCC_ARM\blinky.bin

ARMC6 compiler output

>mbed compile -m MTS_MDOT_F411RE -t ARMC6 --source . --source ..\mts-mbed-os
[Warning] @,: Compiler version mismatch: Could not detect version; expected version >= 6.10 and < 7.0
Building project blinky (MTS_MDOT_F411RE, ARMC6)
Scan: blinky
Scan: mts-mbed-os
Using ROM regions bootloader, application in this build.
  Region bootloader: size 0x10000, offset 0x8000000
  Region application: size 0x70000, offset 0x8010000

...

Link: blinky
[Warning] @0,0: L3912W: Option 'legacyalign' is deprecated.
[Warning] @0,0: L6439W: Multiply defined Global Symbol void events::EventQueue::function_call<mbed::Callback<void()>>(void*) defined in invalid_group(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/components/wifi/esp8266-driver/ESP8266Interface.o) rejected in favor of Symbol defined in .text._ZN6events10EventQueue13function_callIN4mbed8CallbackIFvvEEEEEvPv(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/drivers/source/usb/USBCDC_ECM.o).
[Warning] @0,0: L6439W: Multiply defined Global Symbol SingletonPtr<mbed::Timeout>::get() const defined in invalid_group(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/frameworks/utest/source/utest_shim.o) rejected in favor of Symbol defined in .text._ZNK12SingletonPtrIN4mbed7TimeoutEE3getEv(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.o).
[Warning] @0,0: L6439W: Multiply defined Global Symbol SingletonPtr<rtos::Mutex>::get() const defined in invalid_group(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/drivers/source/AnalogIn.o) rejected in favor of Symbol defined in .text._ZNK12SingletonPtrIN4rtos5MutexEE3getEv(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/drivers/source/SPI.o).
[Warning] @0,0: L6439W: Multiply defined Global Symbol mbed::Callback<void()>::thunk(void*) defined in invalid_group(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/netsocket/CellularNonIPSocket.o) rejected in favor of Symbol defined in .text._ZN4mbed8CallbackIFvvEE5thunkEPv(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/netsocket/InternetSocket.o).
[Warning] @0,0: L6439W: Multiply defined Global Symbol mbed::DirHandle::readdir()::ent defined in invalid_group(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/storage/filesystem/Dir.o) rejected in favor of Symbol defined in .bss._ZZN4mbed9DirHandle7readdirEvE3ent(BUILD/MTS_MDOT_F411RE/ARMC6/mts-mbed-os/features/storage/filesystem/FileSystem.o).
Elf2Bin: blinky
Merging Regions
  Filling region bootloader with C:\Users\theck\Documents\mbed\blinky\bootloader/mdot-bootloader_v0.1.6-11-gd087115.bin
  Filling region application with .\BUILD\MTS_MDOT_F411RE\ARMC6\blinky_application.bin
Space used after regions merged: 0x1929c
Merging Regions
  Filling region application with .\BUILD\MTS_MDOT_F411RE\ARMC6\blinky_application.bin
Space used after regions merged: 0x929c
| Module                 |         .text |     .data |        .bss |
|------------------------|---------------|-----------|-------------|
| [lib]\c_w.l            |   11211(+872) |    16(+4) |    348(+68) |
| [lib]\fz_wm.l          |        18(+0) |     0(+0) |       0(+0) |
| [lib]\libcppabi_w.l    |        44(+0) |     0(+0) |       0(+0) |
| [lib]\m_wm.l           |        48(+0) |     0(+0) |       0(+0) |
| anon$$obj.o            |        32(+0) |     0(+0) | 1280(-3072) |
| main.o                 |      280(+34) |     0(+0) |    184(+32) |
| mts-mbed-os\components |       50(+50) |     0(+0) |       0(+0) |
| mts-mbed-os\drivers    |    1334(+194) |     0(+0) |       0(+0) |
| mts-mbed-os\hal        |    1772(+176) |     4(+0) |      66(+0) |
| mts-mbed-os\platform   |    6595(+405) |    64(+0) |    340(+72) |
| mts-mbed-os\rtos       |   8990(+8990) | 168(+168) | 6626(+6626) |
| mts-mbed-os\targets    |    6847(+750) |     4(+0) |   792(+488) |
| Subtotals              | 37221(+11471) | 256(+172) | 9636(+4214) |
Total Static RAM memory (data + bss): 9892(+4386) bytes
Total Flash memory (text + data): 37477(+11643) bytes

Update Image: .\BUILD\MTS_MDOT_F411RE\ARMC6\blinky_update.bin
Image: .\BUILD\MTS_MDOT_F411RE\ARMC6\blinky.bin

IAR compiler output

>mbed compile -m MTS_MDOT_F411RE -t IAR --source . --source ..\mts-mbed-os
[Warning] @,: Compiler version mismatch: Have 8.50; expected 8.32
Building project blinky (MTS_MDOT_F411RE, IAR)
Scan: blinky
Scan: mts-mbed-os
Using ROM regions bootloader, application in this build.
  Region bootloader: size 0x10000, offset 0x8000000
  Region application: size 0x70000, offset 0x8010000

...

Link: blinky
Elf2Bin: blinky
Merging Regions
  Filling region bootloader with C:\Users\theck\Documents\mbed\blinky\bootloader/mdot-bootloader_v0.1.6-11-gd087115.bin
  Filling region application with .\BUILD\MTS_MDOT_F411RE\IAR\blinky_application.bin
Space used after regions merged: 0x19410
Merging Regions
  Filling region application with .\BUILD\MTS_MDOT_F411RE\IAR\blinky_application.bin
Space used after regions merged: 0x9410
| Module               |     .text |   .data |       .bss |
|----------------------|-----------|---------|------------|
| [lib]\dl7M_tlf.a     | 11543(+0) | 304(+0) |    700(+0) |
| [lib]\dlpp7M_tl_fc.a |    84(+0) |   0(+0) |      0(+0) |
| [lib]\m7M_tls.a      |  2298(+0) |   0(+0) |      0(+0) |
| [lib]\rt7M_tl.a      |   766(+0) |   0(+0) |      0(+0) |
| [lib]\th7M_tlf.a     |   304(+0) |   0(+0) |     16(+0) |
| [misc]               |   261(+0) |   0(+0) |      0(+0) |
| main.o               |   164(+0) |   0(+0) |    184(+0) |
| mts-mbed-os\drivers  |   630(+0) |   0(+0) |      0(+0) |
| mts-mbed-os\features |   176(+0) |   0(+0) |      0(+0) |
| mts-mbed-os\hal      |  1812(+0) |   4(+0) |     66(+0) |
| mts-mbed-os\platform |  5642(+0) | 144(+0) |    263(+0) |
| mts-mbed-os\rtos     |  7880(+0) | 168(+0) |   6325(+0) |
| mts-mbed-os\targets  |  6288(+0) |   4(+0) |  792(+476) |
| Subtotals            | 37848(+0) | 624(+0) | 8346(+476) |
Total Static RAM memory (data + bss): 8970(+476) bytes
Total Flash memory (text + data): 38472(+0) bytes

Update Image: .\BUILD\MTS_MDOT_F411RE\IAR\blinky_update.bin
Image: .\BUILD\MTS_MDOT_F411RE\IAR\blinky.bin


Reviewers


@mergify
Copy link

mergify bot commented Apr 6, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot added the needs: work label Apr 6, 2020
@ciarmcom ciarmcom requested review from a team April 6, 2020 23:00
@ciarmcom
Copy link
Member

ciarmcom commented Apr 6, 2020

@theckmts, thank you for your changes.
@ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-tools please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 7, 2020

@theckmts Please rebase and let us know once the branch is up to date

@theckmts theckmts force-pushed the update-mdot-target branch from ce6e07d to 300820f Compare April 7, 2020 14:36
@theckmts
Copy link
Contributor Author

theckmts commented Apr 7, 2020

Rebase done

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 15, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 15, 2020

Test run: SUCCESS

Summary: 7 of 7 test jobs passed
Build number : 1
Build artifacts

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.

4 participants