Skip to content

NRF52840 Bare Metal - Linker Script not found #10655

Closed
@DBS06

Description

@DBS06

Description

Hi,
I already build successfully a custom bootloader with mbed-dev, but to maintain another repository is expensive in time and costs, I tried to build a bare-metal bootloader application with mbed-os 5.12.3, but the compilation fails with an error which says no linker script found.

mbed compile --profile .\profiles\bootloader.json -m NRF52840_DK --build BUILD_RELEASE -t GCC_ARM --app-config .\_____\_____\cfg\mbed_app.json
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Working path "P:\________" (program)
Building project _________-app (NRF52840_DK, GCC_ARM)
Scan: _________-app
Using ROM regions application, post_application in this build.
  Region application: size 0x6000, offset 0x0
  Region post_application: size 0xfa000, offset 0x6000
No Linker Script found

Could not compile for NRF52840_DK: No Linker Script found
[mbed] ERROR: "c:\program files (x86)\python37-32\python.exe" returned error.
       Code: 1
       Path: "P:\_____________"
       Command: "c:\program files (x86)\python37-32\python.exe -u P:\_____________\mbed-os\tools\make.py -t GCC_ARM -m NRF52840_DK --profile .\profiles\bootloader.json --source . --build BUILD_RELEASE --app-config .\_______\bootloader-app\cfg\mbed_app.json"
       Tip: You could retry the last command with "-v" flag for verbose output
---
[mbed] WARNING: Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting

If I remove

    "requires": [
        "bare-metal"
    ],

from my mbed_app.json, mbed compile finds the Linker Script for the NRF52840.
What could be the reason for this?
With a different target (i.e. EFM32PG12_STK3402) it works.

mbed compile --profile .\profiles\bootloader.json -m EFM32PG12_STK3402 --build BUILD_RELEASE -t GCC_ARM --app-config .\_______\bootloader-app\cfg\mbed_app.json --clean
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Working path "P:\_____________" (program)
Building project _________-app (EFM32PG12_STK3402, GCC_ARM)
Scan: ng-master-app
Using ROM regions application, post_application in this build.
  Region application: size 0x6000, offset 0x0
  Region post_application: size 0xfa000, offset 0x6000
Compile [  0.4%]: except.S
Compile [  0.9%]: mbed_tz_context.c
Compile [  1.3%]: mbed_fault_handler.c
Compile [  1.8%]: Ethernet.cpp
Compile [  2.2%]: CAN.cpp
...

I looked inside the target folders and configuration files for this two targets and compared them, but I didn't found obvious differences which could explain this.
I would be really grateful if somebody could look inside this issue!

Issue request type

[X] Question
[ ] Enhancement
[X] Bug

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