ChibiOS on iNemo v1

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: ChibiOS on iNemo v1

Post by kulve »

Giovanni wrote:There must be something wrong with integration or tools, are you using the standard Makefiles? compiler version? standard compiler options? using the correct linker script? including the correct directories in Makefile? using the standard startup code? Linked libraries with project?
Giovanni


We'll double check those. Btw, what compiler do you use? And what compiler options (I think we use the same few as in most of the demos)?

Thanks.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS on iNemo v1

Post by Giovanni »

I usually use YAGARTO, any version of it has been tested, currently I am using version 4.6.2. I also test using the current CodeSourcery toolchain. In general GCC is without problems.

The options are those you can see in the standard makefiles.

Giovanni
zuh
Posts: 8
Joined: Sun Nov 06, 2011 8:47 pm

Re: ChibiOS on iNemo v1

Post by zuh »

The port_init() was a red herring, the toolchain doesn't like -O2 when debugging. With -O0, my board files and the STM32F103xE.ld linker script the ADC example seems to be running.

And furthermore, I realized I was calling adcStartConversion() inside the main loop. Taking that outside the loop makes my program run (I won't say work until I make sense of the data). So looks like this was just invalid user error all along... :oops:

Though, this doesn't explain the I²C issues but maybe those are something else.

I'm using the free Mentor Graphics Sourcery toolchain (arm-2011.03-42-arm-none-eabi) btw.
zuh
Posts: 8
Joined: Sun Nov 06, 2011 8:47 pm

Re: ChibiOS on iNemo v1

Post by zuh »

One additional observation, looks like the circular buffer option of ADCConversionGroup needs to be TRUE if using the continuous conversion. Otherwise it'll read once and hang.

So this was a mixture of things and I never before managed to get them all right in the same go...
zuh
Posts: 8
Joined: Sun Nov 06, 2011 8:47 pm

Re: ChibiOS on iNemo v1

Post by zuh »

One additional additional observation ;)

Although the continuous conversion runs (ie. the conversion callback is called), the led stays dead.

So the main loop effectively is not running. There's something fishy still here...
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: ChibiOS on iNemo v1

Post by kulve »

Giovanni, we updated the ADC branch in github:

https://github.com/snowcap-electronics/ ... src/main.c

Do you have more hints why our main loop seems to be getting stucked while the ADC callback gets still called?

The iNEMO has a high density F103 and I noticed that none of the demos in ChibiOS uses that. But I guess the medium density MCU is close enough from the OS point of view for testing etc.

Thanks for your help!
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS on iNemo v1

Post by Giovanni »

The best thing you can do is to package a small project (remove anything not strictly needed to showcase the problem) that I can just compile and run. I don't have HD devices but I can test on MD and XL.

Giovanni
chrismerck
Posts: 21
Joined: Fri Mar 14, 2014 12:35 am
Been thanked: 4 times

Re: ChibiOS on iNemo v1

Post by chrismerck »

@zuh, @kulve: Did you ever resolve your issue? I'm running into a similar issue on STM32F205 project with ChibiOS 3.x. Thanks!
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: ChibiOS on iNemo v1

Post by RoccoMarco »

chrismerck can you explain your problem? I am working on STM32F207. Maybe I can help you.
Ciao,
RM
User avatar
kulve
Posts: 86
Joined: Mon Nov 28, 2011 8:36 pm

Re: ChibiOS on iNemo v1

Post by kulve »

chrismerck wrote:@zuh, @kulve: Did you ever resolve your issue? I'm running into a similar issue on STM32F205 project with ChibiOS 3.x. Thanks!


I don't think we did. But that's a long time ago. Looking at the thread now, we had several issues in there. Our overall SW wasn't that good, so I'm sure we just had too many bugs in our code.
Post Reply