Commit 4c0752ca authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Back to working on bootloading F*watch application

parent c0ad6092
...@@ -145,20 +145,24 @@ int main(void) ...@@ -145,20 +145,24 @@ int main(void)
int j; int j;
#if !defined( SIMULATE_SWDCLK_PIN_HI ) #if !defined( SIMULATE_SWDCLK_PIN_HI )
/* Listen button TL and TR, if both are pressed then enter bootloader mode */ /* Listen button BR and enter bootloader mode if pressed */
while (GPIO_PinInGet(gpioPortC, 6)) while (GPIO_PinInGet(gpioPortA, 8))
{ {
USB_PUTS( "SWDCLK is low\r\n" ); USB_PUTS( "SWDCLK is low\r\n" );
if ( BOOT_checkFirmwareIsValid() ) if ( BOOT_checkFirmwareIsValid() )
{ {
GPIO_PinOutSet(gpioPortE, 11); GPIO_PinOutSet(gpioPortE, 11);
for (j = 0; j < 1000000; j++) ;
USB_PUTS( "Booting application\r\n " ); USB_PUTS( "Booting application\r\n " );
BOOT_boot(); BOOT_boot();
} }
else else
{ {
GPIO_PinOutSet(gpioPortE, 12); GPIO_PinOutSet(gpioPortE, 12);
for (j = 0; j < 1000000; j++) ;
USB_PUTS( "No valid application, resetting EFM32... \r\n" ); USB_PUTS( "No valid application, resetting EFM32... \r\n" );
/* Go to EM2 and wait for RTC wakeup. */ /* Go to EM2 and wait for RTC wakeup. */
......
...@@ -105,7 +105,7 @@ override ASMFLAGS += -x assembler-with-cpp -D$(DEVICE) -Wall -Wextra -mcpu=corte ...@@ -105,7 +105,7 @@ override ASMFLAGS += -x assembler-with-cpp -D$(DEVICE) -Wall -Wextra -mcpu=corte
# NOTE: The -Wl,--gc-sections flag may interfere with debugging using gdb. # NOTE: The -Wl,--gc-sections flag may interfere with debugging using gdb.
# #
override LDFLAGS += -Xlinker -Map=$(LST_DIR)/$(PROJECTNAME).map -mcpu=cortex-m3 \ override LDFLAGS += -Xlinker -Map=$(LST_DIR)/$(PROJECTNAME).map -mcpu=cortex-m3 \
-mthumb -T../common/Device/EnergyMicro/EFM32GG/Source/GCC/efm32gg.ld \ -mthumb -T../common/Device/EnergyMicro/EFM32GG/Source/GCC/efm32gg_bootld.ld \
-Wl,--gc-sections -Wl,--gc-sections
LIBS = -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group LIBS = -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment