Skip to content

Update linker files for NUCLEO_F207ZG and enable bootloader functionality #7871

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 3 commits into from
Aug 30, 2018
Merged

Update linker files for NUCLEO_F207ZG and enable bootloader functionality #7871

merged 3 commits into from
Aug 30, 2018

Conversation

juhoeskeli
Copy link
Contributor

@juhoeskeli juhoeskeli commented Aug 23, 2018

Description

Updated linker and startup files for target

  • ARM_STD startup file cleanup; removed stack & heap configuration section which seemed like leftovers from somewhere. As far as I can tell they had no function.
  • ARM_STD linker file to support MBED_APP_START
  • GCC_ARM linker file to support MBED_APP_START
  • IAR linker file to support MBED_APP_START
  • IAR linker file stack configured to 1kB and heap 64kB
    Bootloader support
  • Add bootloader_supported to targets.json
  • Update vector table with application start address

Tested with MCC internal version on all three compilers, with and without MBED_APP_START. Bootloader not tested.

Pull request type

[ ] Fix
[ ] Refactor
[X] Target update
[ ] Functionality change
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team August 23, 2018 13:33
@juhoeskeli
Copy link
Contributor Author

Bootloader seems to be OK on all three compilers.

@@ -404,33 +382,6 @@ HASH_RNG_IRQHandler
ENDP

ALIGN

Copy link
Contributor

Choose a reason for hiding this comment

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

why are we removing these lines in this startup file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To save memory. It was my impression that they are leftovers from somewhere and actually serve no purpose other than eat up memory. They seem to be used by __user_initial_stackheap which is not used for anything as far as I know.

In case it would be actually needed for something we have those targets that do not have these kind of definitions. For example startup_stm32F411xe.S or startup_stm32l486xx.S which I know work with MCC. Those targets that do have these sections seem to be under TOOLCHAIN_ARM_MICRO. startup_stm32l031xx.S for example has the "Tailor this value ..." comment left but has other parts removed in similar fashion. In fact, I think this is the only STM target that has these definitions under TOOLCHAIN_ARM_STD.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may be wrong though and maybe they do have some purpose. I just don't know what it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But if there is no reason I would gladly see them gone. It adds up to 1536 bytes of RAM.

Copy link
Contributor

Choose a reason for hiding this comment

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

These lines are removed the same way in all other ST platforms. I don't know why this was not the case for this one...

@AnttiKauppila
Copy link

AnttiKauppila commented Aug 27, 2018

@0xc0170 Can you trigger a build for this
We would like to target this to 5.10.0-rc?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 27, 2018

@0xc0170 Can you trigger a build for this

I am waiting for @ARMmbed/team-st-mcd review (the changes look good, just do not understand the removal for two regions memory/microlib there).

@@ -404,33 +382,6 @@ HASH_RNG_IRQHandler
ENDP

ALIGN

Copy link
Contributor

Choose a reason for hiding this comment

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

These lines are removed the same way in all other ST platforms. I don't know why this was not the case for this one...

/*Heap 1/4 of ram and stack 1/8*/
define symbol __size_cstack__ = 0x4000;
define symbol __size_heap__ = 0x8000;
/* Stack: 4kB - 408B for vector table */
Copy link
Contributor

Choose a reason for hiding this comment

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

Stack is now 1KB. Maybe change this comment.

@juhoeskeli
Copy link
Contributor Author

Review now done & changes made according to review. @0xc0170 Can you trigger a build for this

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2018

Build : SUCCESS

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

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2018

@AnttiKauppila
Copy link

@0xc0170 Can you merge this? Everything is ok with this.

@0xc0170 0xc0170 merged commit 56117a8 into ARMmbed:master Aug 30, 2018
@0xc0170 0xc0170 changed the title Updated linker files (GCC_ARM, ARM, IAR) for NUCLEO_F207ZG and enabled bootloader functionality Update linker files for NUCLEO_F207ZG and enable bootloader functionality Aug 30, 2018
@mbed-ci
Copy link

mbed-ci commented Aug 30, 2018

Exporter Build : FAILURE

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

@juhoeskeli juhoeskeli deleted the NUCLEO_F207ZG_LINKER_MCC branch August 30, 2018 08:38
@juhoeskeli juhoeskeli restored the NUCLEO_F207ZG_LINKER_MCC branch August 30, 2018 08:38
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 30, 2018

@studavekar @OPpuolitaival These phantom builds - is there anything we can do about? (latest exporter failure after it was integrated)

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