Thanks, it compiles now clean, but crashes:
Code: Select all
Thread [1] (Suspended: Signal 'SIGINT' received. Description: Interrupt.)
5 chSysHalt() core_cmFunc.h:342 0x08001e04
4 _dbg_check_enter_isr() chdebug.c:168 0x08001e04
3 VectorD4() serial_lld.c:263 0x08002bd0
2 <symbol is not available> 0xfffffffc
1 <symbol is not available> 0xfffffffc
Or
Code: Select all
Thread [1] (Suspended: Signal 'SIGINT' received. Description: Interrupt.)
5 chSysHalt() core_cmFunc.h:342 0x08001018
4 i2c_lld_set_clock() i2c_lld.c:188 0x08001018
3 i2c_lld_start() i2c_lld.c:629 0x08001018
2 i2cStart() i2c.c:105 0x08001018
1 main() main.c:253 0x08001018
It seems to me it crashes somewhere around:
Code: Select all
sdStart(&SD1, NULL);
chp = &SD1;
chprintf(chp,"Debugging SerialDriver... Ready\r\n");
chThdSleepMilliseconds(200);
/* Starts I2C1 PB6=SCL PB7=SDA */
i2cStart(&I2CD1, &i2cfg1);
The original demo works fine:
Code: Select all
*** ChibiOS/RT test suite
***
*** Kernel: 3.0.0dev
*** Compiled: Oct 6 2013 - 12:11:49
*** Compiler: GCC 4.7.4 20130613 (release) [ARM/embedded-4_7-branch revision 200083]
*** Architecture: ARMv7-M
*** Core Variant: Cortex-M3
*** Port Info: Advanced kernel mode
*** Platform: STM32F100 Value Line Medium Density
*** Test Board: ST STM32VL-Discovery