[ 
https://issues.apache.org/jira/browse/MYNEWT-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sterling Hughes updated MYNEWT-477:
-----------------------------------
    Fix Version/s: v1_1_beta1

> newt - Split image requires split startup .s file to be in BSP package
> ----------------------------------------------------------------------
>
>                 Key: MYNEWT-477
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-477
>             Project: Mynewt
>          Issue Type: Bug
>          Components: Newt
>            Reporter: Christopher Collins
>            Assignee: Sterling Hughes
>             Fix For: v1_1_beta1
>
>
> It would be better if all the startup code could go in the MCU package.  If 
> the split startup file is put in the MCU package, a split image build results 
> in an empty second-slot image and the following warning:
> {noformat}
> arm-none-eabi/bin/ld: warning: cannot find entry symbol Reset_Handler_split; 
> defaulting to 0000000000042020
> {noformat}
> Newt thinks the second-stage app uses no symbols from the MCU package, so it 
> doesn't include the MCU .a file in the final link phace.  The app does use a 
> symbol from the MCU app; namely Reset_Handler_split.  This symbol is 
> designated as the entry point in the split linker script, but not referenced 
> anywhere else.
> The reason newt doesn't honor the linker script's reference to 
> Reset_Handler_split has to do with the way it builds split images.  Before 
> performing the final link of the second-stage app, newt performs some "test 
> links" to determine which packages and symbols are shared among the two apps. 
>  The test links are done using the regular stage 1 (loader) linker script.  
> Hence, newt determines early that the second-stage app does not reference the 
> MCU package at all.
> This problem does not occur when the split startup code is in the BSP 
> package, because the second-stage app directly calls BSP functions in main(), 
> namely bsp_init() (called via sysinit()).  Therefore, newt recognizes that 
> the app depends on the BSP package, and includes this package in the final 
> link phase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to