Page 1 of 1

ChibiStudio beginner - how to build community project

Posted: Tue Mar 05, 2019 5:12 pm
by mravenca
Hello,
I recently started with ChibiOS.
After some experiments with SW4STM32 I tried using ChibiStudio.
Projects from testhal compile fine, but I have problems with projects from community subdirectory.
When I try to build for example STM3F7xx-USB_MSD which is located in C:\ChibiStudio\chibios182\community\testhal\STM32\STM32F7xx\USB_MSD, I get error:
Makefile:234: ../../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk: No such file or directory
make: *** No rule to make target '../../../../../ChibiOS-RT/os/common/startup/ARMCMx/compilers/GCC/rules.mk'. Stop.

Do I have to set up some paths somewhere?

Thank you in advance for reply

Vaclav

Re: ChibiStudio beginner - how to build community project

Posted: Tue Mar 05, 2019 5:19 pm
by Giovanni
Hi,

Projects under community directory are unmaintained, Makefiles and configuration files can be not updated to the latest version standard. If you are interested in something into community then you could have to take makefiles and configuration files from maintained projects and fix differences (take files from projects using the same board, it is much simpler).

Projects outside community are meant to be working out of the box.

Giovanni

Re: ChibiStudio beginner - how to build community project

Posted: Tue Mar 05, 2019 5:51 pm
by mravenca
Dear Giovanni,
thank you for a quick reply.
Actually what I am looking for is a working example of USB Host, which can be either for STM32F4-Discovery or STM32F767ZI-Nucleo, as those are the boards that I have.
Vaclav

Re: ChibiStudio beginner - how to build community project

Posted: Tue Mar 05, 2019 8:55 pm
by mravenca
The RT-STM32-LWIP-FATFS-USB demo looks promising. Just have to change a few things in the configuration files and hopefully it is going to work :)

Vaclav

Re: ChibiStudio beginner - how to build community project

Posted: Sat Mar 09, 2019 7:58 pm
by mravenca
The demo RT-STM32-LWIP-FATFS-USB works. I bought STM32F746-Discovery board 8-) I already added there uGFX.

However, I also had a look at demo for SPI (from testhal\STM32\STM32F7xx\SPI\). This demo works too, but when I tried to integrate it into RT-STM32-LWIP-FATFS-USB, the system hangs.

I think it can be a problem with memory, because in RT-STM32-LWIP-FATFS-USB there is already relatively a lot of threads.

Any suggestions what to check? Thanks

Vaclav

Re: ChibiStudio beginner - how to build community project

Posted: Sat Mar 09, 2019 8:01 pm
by Giovanni
Check for DMA conflicts in mcuconf.h. The number of threads does not matter unless you got stack sizes wrong.

Giovanni

Re: ChibiStudio beginner - how to build community project

Posted: Sat Mar 09, 2019 9:00 pm
by mravenca
There doesn't seem to be a DMA conflict. However if eventually it was, I found this in mcuconf.h:

#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")

If system halts, how I can see this message("DMA failure")?

Thanks

Vaclav

Re: ChibiStudio beginner - how to build community project

Posted: Sat Mar 09, 2019 9:08 pm
by Giovanni
Hi,

Find the procedures and indications here: http://www.chibios.org/dokuwiki/doku.ph ... ebug_guide

You need to enable debug options, a lot of problems are caught by assertions and other mechanisms.

Giovanni

Re: ChibiStudio beginner - how to build community project

Posted: Sat Mar 09, 2019 9:12 pm
by mravenca
Thank you very much. Despite I successfully integrated uGFX I am still a newbie to ChibiOS. I play with it for a few days.

Vaclav