Guys,
I'm working on my project and trying to import the ChibiOSRT to my project. Which folder should be imported? it looks some folders in the folder of OS must be added. is it enough?
I'm using version of 21.11.3
What files should be imported in MDK5?
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: What files should be imported in MDK5?
Hi,
Easiest way is to look for the .mk files in the various subsystems and include the files specified in there, for example for RT look into rt.mk.
About which subsystems include, look into a Makefile where all .mk are included.
There is also an F3 project for MDK under /demos/STM32, you may start from that.
Giovanni
Easiest way is to look for the .mk files in the various subsystems and include the files specified in there, for example for RT look into rt.mk.
About which subsystems include, look into a Makefile where all .mk are included.
There is also an F3 project for MDK under /demos/STM32, you may start from that.
Giovanni
Re: What files should be imported in MDK5?
Hi Giovanni,
Everything looks ok but there is a problem for "hal port". Which version(e.g. ADC and etc.) of peripherals should be add for our MCU? We are using STM32F103ZET and this part of Chibios is a little bit complicated.
I'm talking about this address: .\ChibiOS_21.11.3\os\hal\ports\STM32\LLD
Everything looks ok but there is a problem for "hal port". Which version(e.g. ADC and etc.) of peripherals should be add for our MCU? We are using STM32F103ZET and this part of Chibios is a little bit complicated.
I'm talking about this address: .\ChibiOS_21.11.3\os\hal\ports\STM32\LLD
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: What files should be imported in MDK5?
It is simple, each STM32 has different versions of some peripherals.
You need to look into .\ChibiOS_21.11.3\os\hal\ports\STM32\STM32F1xx\platform.mk, the list of the LLDs to be included is in there.
Giovanni
You need to look into .\ChibiOS_21.11.3\os\hal\ports\STM32\STM32F1xx\platform.mk, the list of the LLDs to be included is in there.
Giovanni
Re: What files should be imported in MDK5?
Giovanni wrote:It is simple, each STM32 has different versions of some peripherals.
You need to look into .\ChibiOS_21.11.3\os\hal\ports\STM32\STM32F1xx\platform.mk, the list of the LLDs to be included is in there.
Giovanni
Thank you. All the files included but got too much error and warnings.
The MDK compiler I've used is v6.
Here is the links to the file of errors amd warnings:
https://filebin.net/yrux8pg84p0w57wu/sd ... dfgdfg.txt
or
https://jmp.sh/s/kDnFLASXxUPXaX1rmKWp
or
https://www.file.io/DV0o/download/82xBSoJsEfx7
P.S. I don't know why I got error when I'm trying to upload a text file of the errors.
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: What files should be imported in MDK5?
Hi,
You need to enable C99 compatibility in your compiler.
Giovanni
You need to enable C99 compatibility in your compiler.
Giovanni
Re: What files should be imported in MDK5?
Giovanni wrote:Hi,
You need to enable C99 compatibility in your compiler.
Giovanni
Done but got errors and warnings. Here is the file of compiler log to see the warnings and errors:
https://filebin.net/n40ta7eifg5mrms2/seerlgzsdsdsd.txt
or
https://jumpshare.com/s/R9mNRgnVux3KnJPnJ3rB
And also you have defined this part for the compiler as "Preprocessor Symbols" in F303 project:
Code: Select all
CORTEX_USE_FPU=0 TEST_CFG_SIZE_REPORT=0 __heap_base__=Image$$$$RW_IRAM1$$$$ZI$$$$Limit __heap_end__=Image$$$$RW_IRAM2$$$$Base
And this part for "Misc Controls":
Code: Select all
-USTM32F303xC
And this part for "compiler control string":
Code: Select all
--c99 -c --cpu Cortex-M4 -g -O2 --apcs=interwork -I ../ -I ../cfg -I ../../../../os/license -I ../../../../os/common/startup/ARMCMx/devices/STM32F3xx -I ../../../../os/common/ext/ARM/CMSIS/Core/Include -I ../../../../os/common/ext/ST/STM32F3xx -I ../../../../os/common/portability/Keil -I ../../../../os/common/ports/ARM-common -I ../../../../os/common/ports/ARMv7-M -I ../../../../os/rt/include -I ../../../../os/oslib/include -I ../../../../os/hal/osal/rt-nil -I ../../../../os/hal/include -I ../../../../os/hal/boards/ST_STM32F3_DISCOVERY -I ../../../../os/hal/ports/common/ARMCMx -I ../../../../os/hal/ports/STM32/STM32F3xx -I ../../../../os/hal/ports/STM32/LLD/ADCv3 -I ../../../../os/hal/ports/STM32/LLD/CANv1 -I ../../../../os/hal/ports/STM32/LLD/DACv1 -I ../../../../os/hal/ports/STM32/LLD/DMAv1 -I ../../../../os/hal/ports/STM32/LLD/EXTIv1 -I ../../../../os/hal/ports/STM32/LLD/GPIOv2 -I ../../../../os/hal/ports/STM32/LLD/I2Cv2 -I ../../../../os/hal/ports/STM32/LLD/RTCv2 -I ../../../../os/hal/ports/STM32/LLD/SPIv2 -I ../../../../os/hal/ports/STM32/LLD/SYSTICKv1 -I ../../../../os/hal/ports/STM32/LLD/TIMv1 -I ../../../../os/hal/ports/STM32/LLD/USART -I ../../../../os/hal/ports/STM32/LLD/USARTv2 -I ../../../../os/hal/ports/STM32/LLD/USBv1 -I ../../../../os/hal/ports/STM32/LLD/xWDGv1 -I ../../../../os/test/include -I ../../../../test/rt/source/test -I ../../../../test/oslib/source/test -USTM32F303xC
-IC:/Keil_v5/ARM/CMSIS/Include
-IDevice/Include
-D__UVISION_VERSION="538" -DCORTEX_USE_FPU="0" -DTEST_CFG_SIZE_REPORT="0" -D__heap_base__="Image$$RW_IRAM1$$ZI$$Limit" -D__heap_end__="Image$$RW_IRAM2$$Base"
-o .\obj\*.o --omf_browse .\obj\*.crf --depend .\obj\*.d
While in my IDE just this part is defined for "compiler control string" and there is nothing defined for ""Misc Controls" and "Preprocessor Symbols".
Code: Select all
-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m3 -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-4 -O0 -ffunction-sections -Weverything -Wno-packed -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ./ADPCM -I ./ChibiOS_21.11.3/os/rt/include -I ./ChibiOS_21.11.3/os/rt/src -I ./ChibiOS_21.11.3/os/rt/templates -I ./ChibiOS_21.11.3/os/license -I ./ChibiOS_21.11.3/os/common/ports/ARM-common -I ./ChibiOS_21.11.3/os/common/portability/Keil -I ./ChibiOS_21.11.3/os/common/ports/ARMv6-M -I ./ChibiOS_21.11.3/os/common/startup/ARMCMx/devices/STM32F1xx -I ./ChibiOS_21.11.3/os/hal/boards/OLIMEX_STM32_LCD -I ./ChibiOS_21.11.3/os/common/ext/ST/STM32F1xx -I ./ChibiOS_21.11.3/os/hal/include -I ./ChibiOS_21.11.3/os/hal/ports/common/ARMCMx -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD -I ./ChibiOS_21.11.3/os/hal/osal/rt-nil -I ./ChibiOS_21.11.3/os/test/include -I ./ChibiOS_21.11.3/test/rt/source/test -I ./ChibiOS_21.11.3/test/oslib/source/test -I ./ChibiOS_21.11.3/os/oslib/include -I ./ChibiOS_21.11.3/demos/STM32/RT-STM32F103RB-NUCLEO64/cfg -I ./ChibiOS_21.11.3/os/hal/ports/STM32/STM32F1xx -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/DMAv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/CANv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/DACv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/GPIOv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/I2Cv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/RTCv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/SDIOv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/SPIv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/SYSTICKv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/TIMv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/USARTv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/USBv1 -I ./ChibiOS_21.11.3/os/hal/ports/STM32/LLD/xWDGv1 -I ./ChibiOS_21.11.3/os/common/ext/ARM/CMSIS/Core/Include -I ./ChibiOS_21.11.3/os/common/portability/Keil
-I./RTE/Device/STM32F103ZE
-I./RTE/_ili9488
-IC:/Keil_v5/ARM/Pack/ARM/CMSIS/5.9.0/CMSIS/Core/Include
-IC:/Keil_v5/ARM/Pack/Keil/STM32F1xx_DFP/2.2.0/Device/Include
-IC:/Keil_v5/ARM/Pack/Keil/STM32F1xx_DFP/2.2.0/Device/StdPeriph_Driver/inc
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F10X_HD -D_RTE_
-o ./Objects/*.o -MD
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: What files should be imported in MDK5?
It looks like you assembler does not use the C preprocessor so all macros and comments cause errors, look for an assembler option for that.
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14563
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1111 times
- Been thanked: 937 times
- Contact:
Re: What files should be imported in MDK5?
Giovanni wrote:Does that F3 demo compile in your MDK?
Giovanni
Ammmmm, Ok, let me try it. Nop! got some errors and warnings but different than mine. Take a look:
https://filebin.net/1p49txksziwd20ag/dfdgdkkhjk.txt
or
https://jumpshare.com/s/x3eGkayM7xa8e59eXvMW
Please not that I'm using MDK5 with compiler v6 not v5 (while you've set it up to v5 and I changed it because v5 is not availble in new version of MDK). As you can see in log file.
Who is online
Users browsing this forum: No registered users and 4 guests