diff --git a/lib/README b/lib/README index c7e754b3..873d7b2e 100644 --- a/lib/README +++ b/lib/README @@ -20,7 +20,8 @@ with gcc's LTO feature. See cmsis-sam3x8e.patch for the modifications. The sam3x directory contains code from the Atmel.SAM3X_DFP.1.0.50.atpack zip file found at: http://packs.download.atmel.com/ -version 1.0.50 (extracted on 20180725). +version 1.0.50 (extracted on 20180725). It has been modified to +compile with gcc's LTO feature. See sam3x.patch for the modifications. The lpc176x directory contains code from the mbed project: https://github.com/ARMmbed/mbed-os diff --git a/lib/sam3x/gcc/gcc/startup_sam3xa.c b/lib/sam3x/gcc/gcc/startup_sam3xa.c index 337a6d3c..dcf56447 100644 --- a/lib/sam3x/gcc/gcc/startup_sam3xa.c +++ b/lib/sam3x/gcc/gcc/startup_sam3xa.c @@ -132,7 +132,7 @@ void CAN0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler"))); void CAN1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler"))); /* Exception Table */ -__attribute__ ((section(".vectors"))) +__attribute__ ((section(".vectors"))) __attribute__((externally_visible)) const DeviceVectors exception_table = { /* Configure Initial Stack Pointer, using linker-generated symbols */ diff --git a/lib/sam3x/sam3x.patch b/lib/sam3x/sam3x.patch new file mode 100644 index 00000000..b48826b8 --- /dev/null +++ b/lib/sam3x/sam3x.patch @@ -0,0 +1,13 @@ +diff --git a/lib/sam3x/gcc/gcc/startup_sam3xa.c b/lib/sam3x/gcc/gcc/startup_sam3xa.c +index 337a6d3c..dcf56447 100644 +--- a/lib/sam3x/gcc/gcc/startup_sam3xa.c ++++ b/lib/sam3x/gcc/gcc/startup_sam3xa.c +@@ -132,7 +132,7 @@ void CAN0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler"))); + void CAN1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler"))); + + /* Exception Table */ +-__attribute__ ((section(".vectors"))) ++__attribute__ ((section(".vectors"))) __attribute__((externally_visible)) + const DeviceVectors exception_table = { + + /* Configure Initial Stack Pointer, using linker-generated symbols */