in example/simple_serial rename .c in .c++
modify Maefile.am to compile with avr-g++
with avr-g++ I have to add -fpermissive options
Make do
avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.
serial.c serial.h serial.o
[root@asus-pat1 simple_serial]# avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.
serial.c serial.h serial.o
[root@asus-pat1 simple_serial]# avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.c
[root@asus-pat1 simple_serial]# avr-gcc -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -o simple_serial.elf main.o serial.o
[root@asus-pat1 simple_serial]# avr-objcopy -j .text -j .data -O ihex -R .eeprom -R .fuse -R .lock simple_serial.elf simple_serial.hex
simulavr --file simple_serial.elf
FATAL: file avrfactory.cpp: line 57: Device type not specified, use -d | --device TYPE or insert a SIMINFO_DEVICE(name) macro into your source to specify the device name
readelf -p .siminfo simple_serial.elf
readelf: Warning: Section '.siminfo' was not dumped because it does not exist!
in a different project I get:
readelf -p .siminfo .build/uno/firmware.elf
Dump delle stringhe della sezione ".siminfo":
[ 5] $
[ a] D0
[ e] %
[ 13] D1
[ 17] %
[pat1@asus-pat1 jsonrpc-mqtt]$ simulavr --file .build/uno/firmware.elf
WARNING: file avrreadelf.cpp: line 396: signature for device '��' not found
FATAL: file avrfactory.cpp: line 60: Invalid device specification: ��
in example/simple_serial rename .c in .c++
modify Maefile.am to compile with avr-g++
with avr-g++ I have to add -fpermissive options
Make do
avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.
serial.c serial.h serial.o
[root@asus-pat1 simple_serial]# avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.
serial.c serial.h serial.o
[root@asus-pat1 simple_serial]# avr-g++ -fpermissive -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -c -o serial.o serial.c
[root@asus-pat1 simple_serial]# avr-gcc -g -O2 -mmcu=atmega644 -DF_CPU=20000000 -Wl,--section-start=.siminfo=0x900000 -o simple_serial.elf main.o serial.o
[root@asus-pat1 simple_serial]# avr-objcopy -j .text -j .data -O ihex -R .eeprom -R .fuse -R .lock simple_serial.elf simple_serial.hex
simulavr --file simple_serial.elf
FATAL: file avrfactory.cpp: line 57: Device type not specified, use -d | --device TYPE or insert a SIMINFO_DEVICE(name) macro into your source to specify the device name
readelf -p .siminfo simple_serial.elf
readelf: Warning: Section '.siminfo' was not dumped because it does not exist!
in a different project I get:
readelf -p .siminfo .build/uno/firmware.elf
Dump delle stringhe della sezione ".siminfo":
[ 5] $
[ a] D0
[ e] %
[ 13] D1
[ 17] %
[pat1@asus-pat1 jsonrpc-mqtt]$ simulavr --file .build/uno/firmware.elf
WARNING: file avrreadelf.cpp: line 396: signature for device '��' not found
FATAL: file avrfactory.cpp: line 60: Invalid device specification: ��