Skip to content

Export uVision linker flags so that bootloader projects build correctly #5030

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 1 commit into from
Sep 7, 2017

Conversation

chrissnow
Copy link
Contributor

Description

Bootloader projects require DMBED_APP_START and DMBED_APP_SIZE flags passing to the linker, CLI does this but export did not.

Status

READY

Migrations

NO

Related PRs

Deploy notes

Steps to test or reproduce

Export a bootloader project and it does not have the linker flags set.

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 👏 👏

Wonderful.

Thanks for writing this patch!

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 6, 2017

/morph export-build

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 6, 2017

@chrissnow What is the current behavior without these flags? How to reproduce this issue?

@chrissnow
Copy link
Contributor Author

It will build but will be linked to the defaults in the linker script. Which would be where the bootlooader lives.

@chrissnow
Copy link
Contributor Author

Here is a correctly formed pair of projects
image

Before the "Misc controls" would be empty.

the linker then should have something like this.

#if !defined(MBED_APP_START)
  #define MBED_APP_START 0x00000000
#endif

#if !defined(MBED_APP_SIZE)
  #define MBED_APP_SIZE 0x80000
#endif

LR_IROM1 MBED_APP_START MBED_APP_SIZE  {    ; load region size_region
  ER_IROM1 MBED_APP_START MBED_APP_SIZE  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }

which will correctly move the regions around.

@mbed-bot
Copy link

mbed-bot commented Sep 6, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 135

Exporter Build failed!

@chrissnow
Copy link
Contributor Author

:-( Please could someone share the reason it failed.

@theotherjimmy
Copy link
Contributor

IAR died hard. @studavekar The CI should be able to find iccarm and the other tools in the path for executing the make_iar exporter. Could a machine switch have caused the boat load of IAR error here?

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Sep 6, 2017

@chrissnow It looks like your patch is working, well not breaking CI (no uVision failures at all), and we need to repair the IAR installation or something like that.

@studavekar
Copy link
Contributor

One of the machine didn't had path set, re-triggering

/morph export-build

@mbed-bot
Copy link

mbed-bot commented Sep 7, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 136

All exports and builds passed!

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.

6 participants