build Chibios Under Atollic

Report here problems in any of ChibiOS components. This forum is NOT for support.
crispus
Posts: 22
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 2 times

Re: build Chibios Under Atollic

Postby crispus » Thu Sep 06, 2018 1:04 pm

Using F7 linker scripts it will compile (at least).

So, I was comparing the linker scripts for H7 and F7 and I see that flash0 anf flash1 although point to the same thing (?) they have different addresses, but not for H7 (bank1+bank2 vs bank1).

Code: Select all

    H7
    flash0  : org = 0x08000000, len = 2M        /* Flash bank1+bank2 */
    flash1  : org = 0x08000000, len = 1M        /* Flash bank 1 */
    flash2  : org = 0x08100000, len = 1M        /* Flash bank 2 */
    flash3  : org = 0x00000000, len = 0
    vs F7
    flash0  : org = 0x08000000, len = 2M        /* Flash as AXIM (writable) */
    flash1  : org = 0x00200000, len = 2M        /* Flash as ITCM */

The issue seems to be here:

Code: Select all

/* Flash region to be used for exception vectors.*/
REGION_ALIAS("VECTORS_FLASH", flash1);
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);

If I change flash1 to flash0 the problem is fixed (aka linker error), if I put flash1 len = 0, the linker will complain that the .vector section won't fit.

User avatar
Giovanni
Site Admin
Posts: 11312
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 412 times
Been thanked: 342 times
Contact:

Re: build Chibios Under Atollic

Postby Giovanni » Thu Sep 06, 2018 1:09 pm

Moving this in bug reports, I think it is related to another bug already reported.

Giovanni

crispus
Posts: 22
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 2 times

Re: build Chibios Under Atollic

Postby crispus » Thu Sep 20, 2018 5:34 pm

TWIMC: As a workaround, replacing flash1 with flash0 on each alias compiles and works ok (on ST-Nucleo-H743ZI)

Code: Select all

$ svn diff
Index: os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
===================================================================
--- os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld    (revision 12278)
+++ os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld    (working copy)
@@ -49,15 +49,15 @@
    and a load region (_LMA suffix).*/

 /* Flash region to be used for exception vectors.*/
-REGION_ALIAS("VECTORS_FLASH", flash1);
+REGION_ALIAS("VECTORS_FLASH", flash0);
 REGION_ALIAS("VECTORS_FLASH_LMA", flash0);

 /* Flash region to be used for constructors and destructors.*/
-REGION_ALIAS("XTORS_FLASH", flash1);
+REGION_ALIAS("XTORS_FLASH", flash0);
 REGION_ALIAS("XTORS_FLASH_LMA", flash0);

 /* Flash region to be used for code text.*/
-REGION_ALIAS("TEXT_FLASH", flash1);
+REGION_ALIAS("TEXT_FLASH", flash0);
 REGION_ALIAS("TEXT_FLASH_LMA", flash0);

 /* Flash region to be used for read only data.*/
@@ -65,7 +65,7 @@
 REGION_ALIAS("RODATA_FLASH_LMA", flash0);

 /* Flash region to be used for various.*/
-REGION_ALIAS("VARIOUS_FLASH", flash1);
+REGION_ALIAS("VARIOUS_FLASH", flash0);
 REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);

 /* Flash region to be used for RAM(n) initialization data.*/


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests