[INFO] ChibiOS 3.0 Status

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
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: [INFO] ChibiOS 3.0 Status

Post by russian »

Giovanni wrote:Sure, 2014 :)

So much better than 2015!

I will let the others push you further :)
wgreiman
Posts: 33
Joined: Sun Oct 23, 2011 3:21 pm
Been thanked: 2 times

Re: [INFO] ChibiOS 3.0 Status

Post by wgreiman »

I downloaded ChibiOS 3.0 from GitHub yesterday. I really like how nil is now integrated.

I found a possible problem with serial in the NIL-STM32F051-DISCOVERY demo. I modified this line to write more text.

Code: Select all

   chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);


If I write more than 17 bytes, the example freezes after writing the first two bytes. The blink threads also stop.

I think the problem is in hal_queues.c - oqWriteTimeout().

If I replace the osalThreadEnqueueTimeoutS() with an unlock and return, the program no longer freezes. The message is truncated but the first 18 bytes print.

Code: Select all

  while (oqIsFullI(oqp)) {
      osalSysUnlock();////////////////////////////////////////////////////////
      return w;///////////////////////////////////////////////////////////////   
      if (osalThreadEnqueueTimeoutS(&oqp->q_waiting, time) != Q_OK) {
        osalSysUnlock();
        return w;
      }
    }


I also have a problem building the RT-STM32F051-DISCOVERY demo with the latest version of Sourcery CodeBench Lite. I get the following:
Linking build/ch.elf
main.c: In function 'main':
main.c:58:5: internal compiler error: Segmentation fault
int main(void) {
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourcery.mentor.com/GNUToolchain/> for instructions.
lto-wrapper: arm-none-eabi-gcc returned 1 exit status
c:/users/bill/mentorgraphics/sourcery_codebench_lite_for_arm_eabi/bin/../lib/gcc
/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
cs-make: *** [build/ch.elf] Error 1


If I use this make call it builds.
cs-make USE_LTO=no


I have not tried an older version of Sourcery CodeBench Lite to see if Link Time Optimization works.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] ChibiOS 3.0 Status

Post by Giovanni »

Hi,

LTO is known to work using this toolchain: https://launchpad.net/gcc-arm-embedded

About the issue with queues, I will look into it, thanks for finding.

Giovanni
wgreiman
Posts: 33
Joined: Sun Oct 23, 2011 3:21 pm
Been thanked: 2 times

Re: [INFO] ChibiOS 3.0 Status

Post by wgreiman »

Thanks for the link to the GCC ARM toolchain.

Their just released 4.8 version has a problem with lto but the 2013-09-26 version of 4.7 works.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] ChibiOS 3.0 Status

Post by Giovanni »

Hi,

I finally found the root cause, it was a bug in chSemSignalI() in Nil. Now the queues work as expected.

Next for the 3.0 branch, the AVR and MSP430 ports, this should not take long.

Giovanni
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Re: [INFO] ChibiOS 3.0 Status

Post by part1zan_ »

Got the same problem with segfault, I use Launchpad's arm-none-eabi-gcc:
[03:27:45] che@quad:~/mcu/chibios-stm32f103/ChibiOS-RT/demos/STM32/RT-STM32F103-OLIMEX_STM32_P103$ make
Linking build/ch.elf
main.c: In function 'main':
main.c:41:5: internal compiler error: Segmentation fault
int main(void) {
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: arm-none-eabi-gcc returned 1 exit status
/usr/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [build/ch.elf] Error 1

Fresh ChibiOS/RT, just trying to compile a supplied demo. What should I do?
saraben
Posts: 40
Joined: Thu Sep 20, 2012 12:37 am

Re: [INFO] ChibiOS 3.0 Status

Post by saraben »

Have a look at this thread viewtopic.php?f=2&t=1900

The short answer is that with gcc 4.8 LTO is a problem.
The most reliable results are achieved when LTO is set to no in Makefile.

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

Re: [INFO] ChibiOS 3.0 Status

Post by Giovanni »

Correct, I recommend staying with 4.7.3 which is very reliable. You may give a try to the Bleeding Edge Toolchain 4.8.x, I am not sure it shares this problem. Both compilers are included in ChibiStudio 6.

Giovanni
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: [INFO] ChibiOS 3.0 Status

Post by russian »

Looks like the release is getting closer, but not yet?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [INFO] ChibiOS 3.0 Status

Post by Giovanni »

The "preview 3" has been released yesterday.

Giovanni
Post Reply