Page 1 of 1

CB3.0 F100 - chSysLock and chTimeNow

Posted: Sat Oct 05, 2013 8:32 pm
by pito

Code: Select all

Compiling main.c
main.c: In function 'pwmpcb':
main.c:128:3: warning: implicit declaration of function 'chSysLockFromIsr' [-Wimplicit-function-declaration]
main.c:130:3: warning: implicit declaration of function 'chSysUnlockFromIsr' [-Wimplicit-function-declaration]
main.c: In function 'Thread1':
main.c:187:3: warning: implicit declaration of function 'chTimeNow'

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sat Oct 05, 2013 8:40 pm
by pito

Code: Select all

#include "osal.h"

must be included in main, also into my rtc driver...

NO it does not help.. still the issue above..

Also:

Code: Select all

msg_t RTC_PCF8563_status = RDY_OK;
..
C:\ChibiStudio\Chibi30/os/various/chTinyRTC8563.c:46:28: error: 'RDY_OK' undeclared here (not in a function)

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sat Oct 05, 2013 9:28 pm
by Giovanni
Many functions have been renamed, look for equivalents (FromISR now). Not all drivers have been ported yet (RTC, MAC).

Giovanni

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sat Oct 05, 2013 9:49 pm
by pito
chSysLockFromISR (was ...FromIsr)

still coping with chTimeNow() defined in chvt.h as

Code: Select all

#define chTimeNow() (vtlist.vt_systime)


in my source: chTimeNow()

seems like not being included..

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sun Oct 06, 2013 9:07 am
by Giovanni
It is chVTGetSystemTimeX() now..

Giovanni

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sun Oct 06, 2013 10:59 am
by pito
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

Re: CB3.0 F100 - chSysLock and chTimeNow

Posted: Sun Oct 06, 2013 11:58 am
by pito
moved