mirror of https://github.com/rusefi/wideband.git
works on new board
This commit is contained in:
parent
eef58ae5dc
commit
bf90d1514b
|
@ -175,13 +175,6 @@ THD_FUNCTION(BootloaderThread, arg)
|
||||||
RunBootloaderLoop();
|
RunBootloaderLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Threads creation table, one entry per thread.
|
|
||||||
*/
|
|
||||||
THD_TABLE_BEGIN
|
|
||||||
THD_TABLE_THREAD(0, "bootloader", waBootloaderThread, BootloaderThread, nullptr)
|
|
||||||
THD_TABLE_END
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application entry point.
|
* Application entry point.
|
||||||
*/
|
*/
|
||||||
|
@ -189,12 +182,18 @@ int main(void) {
|
||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
|
chThdCreateStatic(waBootloaderThread, sizeof(waBootloaderThread), NORMALPRIO, BootloaderThread, nullptr);
|
||||||
|
|
||||||
// PB5 is blue LED
|
// PB5 is blue LED
|
||||||
palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL);
|
palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
// PB6 is green LED
|
||||||
|
palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
palTogglePad(GPIOB, 6);
|
||||||
|
|
||||||
for (size_t i = 0; i < 20; i++)
|
for (size_t i = 0; i < 20; i++)
|
||||||
{
|
{
|
||||||
palTogglePad(GPIOB, 5);
|
palTogglePad(GPIOB, 5);
|
||||||
|
palTogglePad(GPIOB, 6);
|
||||||
chThdSleepMilliseconds(40);
|
chThdSleepMilliseconds(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,6 @@ make clean && make -j4
|
||||||
|
|
||||||
# convert bootloader bin output to a linkable .o file
|
# convert bootloader bin output to a linkable .o file
|
||||||
# first pad the binary out with 0xFF
|
# first pad the binary out with 0xFF
|
||||||
arm-none-eabi-objcopy -I binary -O binary --gap-fill 0xFF --pad-to 0x1000 build/wideband_bootloader.bin build/wideband_bootloader.padded.bin
|
arm-none-eabi-objcopy -I binary -O binary --gap-fill 0xFF --pad-to 0x1800 build/wideband_bootloader.bin build/wideband_bootloader.padded.bin
|
||||||
# then convert it to a .o file
|
# then convert it to a .o file
|
||||||
arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm --rename-section .data=.bl build/wideband_bootloader.padded.bin build/wideband_bootloader.o
|
arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm --rename-section .data=.bl build/wideband_bootloader.padded.bin build/wideband_bootloader.o
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* STM32F042x6 memory setup.
|
* STM32F042x6 memory setup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
blsize = 4k;
|
blsize = 6k;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue