Skip to content
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

fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files #3716

Merged
merged 1 commit into from Mar 6, 2017

Conversation

adustm
Copy link
Member

@adustm adustm commented Feb 7, 2017

Description

Startup file have been modified for GCC_ARM since the integration of uvisor.
This modification needs to be ported also for ARM and IAR, even if uvisor is not present on those toolchains.

Status

READY

Migrations

If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.

NO

Related PRs

#3397

Steps to test or reproduce

Before this PR, any DISCO_F429ZI test was running into timeout with ARM and IAR
Now it works

@adustm
Copy link
Member Author

adustm commented Feb 7, 2017

@jeromecoutant it should fix mbed release test errors that you've seen.
Cheers

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 8, 2017

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Feb 8, 2017

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 1526

All builds and test passed!

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

@sg- @adustm @theotherjimmy

Tested working with uVisor on DISCO_F429ZI using mbed OS cd55625.

Build fails with latest mbed OS master (29cfee4) because of a missing /BUILD/DISCO_F429ZI/GCC_ARM/.link_script.ld file., but I don't think that error is related to this PR. Looks like the error may have been introduced with af4d848. Is this a known issue?

@sg-
Copy link
Contributor

sg- commented Feb 13, 2017

@c1728p9 @theotherjimmy Can you have a look?

/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, NUCLEO_F429ZI shares some files with DISCO_F429ZI, including startup files.
Since integration of uvisor for DISCO_F429ZI, this line of the SystemInit is copied into a new function (System_InitPre) that is called before the uvisor_init (if present) and system_init in the startup files.
Then this line is not removed but moved to https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/system_init_pre.c

#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif

Copy link
Contributor

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, NUCLEO_F429ZI shares some files with DISCO_F429ZI, including startup files.
Since integration of uvisor for DISCO_F429ZI, this line of the SystemInit is copied into a new function (System_InitPre) that is called before the uvisor_init (if present) and system_init in the startup files.
Then this line is not removed but moved to https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/system_init_pre.c

@c1728p9
Copy link
Contributor

c1728p9 commented Feb 14, 2017

I had a few questions, but the PR looks fine to me. Also, @AlessandroA should probably take a look, since it was the uVisor changes that caused this problem.

@adustm
Copy link
Member Author

adustm commented Feb 16, 2017

Hello @c1728p9
Thank you for the review.
I've answered your comments.
NUCLEO_F429ZI should soon be added uvisor, like DISCO_F429ZI does. So it makes sense to integrate modifications that will be required for uvisor later on.
kind regards
Armelle

@AlessandroA
Copy link
Contributor

I will re-issue the uVisor tests as I realized that the DISCO_F429ZI target was not tested automatically (this is now fixed).

Copy link
Contributor

@AlessandroA AlessandroA left a comment

Choose a reason for hiding this comment

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

👍

@sg-
Copy link
Contributor

sg- commented Feb 21, 2017

Looks like I missed this in PR #3655 but if there are uVisor specific startup hooks seems the functions should be named uvisor... to avoid confusion.

https://github.com/ARMmbed/mbed-os/search?utf8=%E2%9C%93&q=SystemInitPre

@adustm
Copy link
Member Author

adustm commented Feb 23, 2017

Hello @sg-
SystemInitPre is not specific to uvisor. It is the common part of system init that must be done before uvisor init.
Kind regards

@adustm
Copy link
Member Author

adustm commented Feb 27, 2017

Hi,
This issue is blocking several users on developper.mbed.org and github. Any news ?

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 27, 2017

This issue is blocking several users on developper.mbed.org and github. Any news ?

Can you please resolve the conflict ? We will rerun CI right after

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 27, 2017

SystemInitPre is not specific to uvisor. It is the common part of system init that must be done before uvisor init.

@sg- Please review this

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

bump

…AR, alignment of system_stm32f429xx.c files
@adustm
Copy link
Member Author

adustm commented Feb 28, 2017

Hello @0xc0170
I've rebased and fixed the conflict.
This issue is blocking people willing to use NUCLEO_F429ZI with ARM and IAR toolchains, I hope it will be merged.
Cheers

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

/morph test-nightly

@sg- sg- added needs: CI and removed needs: work labels Feb 28, 2017
@mbed-bot
Copy link

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 1607

All builds and test passed!

@0xc0170 0xc0170 merged commit f168f62 into ARMmbed:master Mar 6, 2017
@adustm adustm deleted the disco_f429zi_debug branch March 7, 2017 09:14
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files ARMmbed/mbed-os#3716
3741: STM32 remove warning in hal_tick_32b.c file ARMmbed/mbed-os#3741
3780: STM32L4 : Fix GPIO G port compatibility ARMmbed/mbed-os#3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) ARMmbed/mbed-os#3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os ARMmbed/mbed-os#3836
3840: STM32: gpio SPEED - always set High Speed by default ARMmbed/mbed-os#3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) ARMmbed/mbed-os#3844
3850: STM32: change spi error to debug warning ARMmbed/mbed-os#3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform ARMmbed/mbed-os#3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated ARMmbed/mbed-os#3880
3795: Fix pwm period calc ARMmbed/mbed-os#3795
3828: STM32 CAN API: correct format and type ARMmbed/mbed-os#3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization ARMmbed/mbed-os#3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) ARMmbed/mbed-os#3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. ARMmbed/mbed-os#3879
3902: Fix heap and stack size for NUCLEO_F746ZG ARMmbed/mbed-os#3902
3829: can_write(): return error code when no tx mailboxes are available ARMmbed/mbed-os#3829
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.

None yet

7 participants