Does ChibiStudio support AVR microcontroller Topic is solved

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderators: utzig, tfAteba

paksoft
Posts: 4
Joined: Fri Apr 15, 2022 9:06 pm
Has thanked: 1 time

Does ChibiStudio support AVR microcontroller

Postby paksoft » Fri Apr 15, 2022 10:18 pm

Hello,
I'm interested in ChibiOS to use in Arduino UNO (Atmega 328) project.

I've downloaded ChibiStudio and WinAVR and tried to create a project but still not able to create a project for AVR microcontroller. Does ChibiStudio support AVR microcontroller?

If yes, please give me the direction how to create a project for AVR microcontroller.

Thanks in advance,
pak

User avatar
Giovanni
Site Admin
Posts: 14056
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 990 times
Been thanked: 839 times
Contact:

Re: Does ChibiStudio support AVR microcontroller

Postby Giovanni » Sat Apr 16, 2022 6:50 am

Hi,

You need to create a makefile project in Eclipse, it will use the Makefile into the AVR project:

New->Project->C/C++->Makefile Project with Existing Code

Then give the project a name.

You need to install the compiler separately because it is not included in ChibiStudio, the debug depends on the availability of a GDB server, I don't know how this is done for AVR frankly.

Giovanni

paksoft
Posts: 4
Joined: Fri Apr 15, 2022 9:06 pm
Has thanked: 1 time

Re: Does ChibiStudio support AVR microcontroller

Postby paksoft » Sat Apr 16, 2022 4:36 pm

Thank for reply,
I've tried the following setup:
- Windows 7 (32-bit)
- Eclipse Oxygen (32-bit)
- AVR Eclipse Plugin (2.4.2)
- NIL-ARDUINO-UNO from ChibiOS_21.11.1

I've some error message as follow:

Code: Select all

23:17:46 **** Build of configuration Default for project NIL-ARDUINO-UNO ****
make all
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Compiler Options
avr-gcc -c -mmcu=atmega328p -I. -gdwarf-2 -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./build/lst/ -DTEST_CFG_SIZE_REPORT=0 -std=gnu11 -mrelax -fdata-sections -ffunction-sections -Wundef -MMD -MP -I. -I./cfg -I../../../os/license -I../../../os/hal/include -I../../../os/hal/boards/ARDUINO_UNO -I../../../os/hal/ports/AVR/MEGA/ATMEGAxx -I../../../os/hal/ports/AVR/MEGA/LLD/ADCv1 -I../../../os/hal/ports/AVR/MEGA/LLD/EXTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/GPIOv1 -I../../../os/hal/ports/AVR/MEGA/LLD/I2Cv1 -I../../../os/hal/ports/AVR/MEGA/LLD/SPIv1 -I../../../os/hal/ports/AVR/MEGA/LLD/TIMv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USARTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USBv1 -I../../../os/hal/osal/rt-nil -I../../../os/nil/include -I../../../os/oslib/include -I../../../os/common/portability/GCC -I../../../os/common/ports/AVR -I../../../os/common/ports/AVR/compilers/GCC main.c -o main.o

Compiling hal.c
cc1.exe: error: unrecognized command line option "-std=gnu11"
make: *** [build/obj/hal.o] Error 1

23:17:46 Build Finished (took 390ms)


Best regards,
pak
Attachments
NIL-ARDUINO-UNO_Error.jpg
NIL-ARDUINO-UNO_Explorer.jpg
2022-04-16 23_27_17-Eclipse Installation Details.jpg

paksoft
Posts: 4
Joined: Fri Apr 15, 2022 9:06 pm
Has thanked: 1 time

Re: Does ChibiStudio support AVR microcontroller

Postby paksoft » Sat Apr 16, 2022 5:26 pm

paksoft wrote:Thank for reply,
I've tried the following setup:
- Windows 7 (32-bit)
- Eclipse Oxygen (32-bit)
- AVR Eclipse Plugin (2.4.2)
- WinAVR20100110
- NIL-ARDUINO-UNO from ChibiOS_21.11.1

I've some error message as follow:

Code: Select all

23:17:46 **** Build of configuration Default for project NIL-ARDUINO-UNO ****
make all
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Compiler Options
avr-gcc -c -mmcu=atmega328p -I. -gdwarf-2 -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./build/lst/ -DTEST_CFG_SIZE_REPORT=0 -std=gnu11 -mrelax -fdata-sections -ffunction-sections -Wundef -MMD -MP -I. -I./cfg -I../../../os/license -I../../../os/hal/include -I../../../os/hal/boards/ARDUINO_UNO -I../../../os/hal/ports/AVR/MEGA/ATMEGAxx -I../../../os/hal/ports/AVR/MEGA/LLD/ADCv1 -I../../../os/hal/ports/AVR/MEGA/LLD/EXTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/GPIOv1 -I../../../os/hal/ports/AVR/MEGA/LLD/I2Cv1 -I../../../os/hal/ports/AVR/MEGA/LLD/SPIv1 -I../../../os/hal/ports/AVR/MEGA/LLD/TIMv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USARTv1 -I../../../os/hal/ports/AVR/MEGA/LLD/USBv1 -I../../../os/hal/osal/rt-nil -I../../../os/nil/include -I../../../os/oslib/include -I../../../os/common/portability/GCC -I../../../os/common/ports/AVR -I../../../os/common/ports/AVR/compilers/GCC main.c -o main.o

Compiling hal.c
cc1.exe: error: unrecognized command line option "-std=gnu11"
make: *** [build/obj/hal.o] Error 1

23:17:46 Build Finished (took 390ms)


I've the same result and error with ChibiStudio and AVR Eclipse Plugin (2.4.2) & WinAVR20100110.
Is it correct way to add AVR toolchain?

Best regards,
pak

User avatar
Giovanni
Site Admin
Posts: 14056
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 990 times
Been thanked: 839 times
Contact:

Re: Does ChibiStudio support AVR microcontroller  Topic is solved

Postby Giovanni » Sun Apr 17, 2022 8:42 am

Hi,

You also need updated GNU utilities (egrep etc), probably errors are caused by that.

If you start from a packaged ChibiStudio then all utilities are already included.

Giovanni

paksoft
Posts: 4
Joined: Fri Apr 15, 2022 9:06 pm
Has thanked: 1 time

Re: Does ChibiStudio support AVR microcontroller

Postby paksoft » Sun Apr 17, 2022 1:21 pm

Giovanni wrote:Hi,

You also need updated GNU utilities (egrep etc), probably errors are caused by that.

If you start from a packaged ChibiStudio then all utilities are already included.

Giovanni


I think make.exe will cause the problem, now I tested with ChibiStudio, it's working fine,

Thank you, so much,

pak


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 3 guests