Re: STM32F030F4
Posted: Wed Jul 15, 2015 9:31 am
I looked at the latest ST headers, apparently the STM32F030F4 is not yet supported. Cloning the x6 is the way to go.
Giovanni
Giovanni
Code: Select all
Reading symbols from build/ch.elf...done.
Remote debugging using :4242
_idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
72 port_wait_for_interrupt();
(gdb) c
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x08000402 in port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
401 }
(gdb) bt
#0 0x08000402 in port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
#1 0x080005ca in _idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
#2 0x080001a6 in _port_thread_start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Code: Select all
* @file stm32f030x6.h
* @author MCD Application Team
* @version V2.0.1
* @date 18-June-2014
* @brief CMSIS STM32F030x4/STM32F030x6 devices Peripheral Access Layer Header
Giovanni wrote:I looked at the latest ST headers, apparently the STM32F030F4 is not yet supported. Cloning the x6 is the way to go.
Giovanni
Code: Select all
void delay (int a);
/*
* Red LED blinker thread, times are in milliseconds.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
while (TRUE) {
palClearPad(GPIOA, GPIOA_PIN5);
//chThdSleepMilliseconds(500);
delay(100000);
palSetPad(GPIOA, GPIOA_PIN5);
delay(100000);
//chThdSleepMilliseconds(500);
}
}
void delay (int a)
{
volatile int i,j;
for (i=0 ; i < a ; i++)
{
j++;
}
return;
}Code: Select all
#0 port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
#1 0x0800051a in _idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
#2 0x080001a6 in _port_thread_start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
etrombly wrote:So I've made some progress with your example Eddie. It seems like there are some issues with chThdSleepMilliseconds not returning though. With the example blink code you provided it was not blinking. If I change the sleep to a delay it blinks.
looks like maybe the thread is never starting correctly?