avr-ada-devel Mailing List for AVR-Ada (Page 2)
Ada cross compiler and libraries for AVR µCs
Status: Beta
Brought to you by:
rolf_ebert
You can subscribe to this list here.
2003 |
Jan
|
Feb
(4) |
Mar
(24) |
Apr
(1) |
May
|
Jun
(15) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(20) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
(3) |
May
|
Jun
(4) |
Jul
(3) |
Aug
|
Sep
|
Oct
(9) |
Nov
(4) |
Dec
(3) |
2005 |
Jan
(8) |
Feb
(10) |
Mar
(11) |
Apr
(95) |
May
(4) |
Jun
(12) |
Jul
(7) |
Aug
(35) |
Sep
(17) |
Oct
(5) |
Nov
(15) |
Dec
(11) |
2006 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(10) |
May
(32) |
Jun
(4) |
Jul
(3) |
Aug
(2) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
|
2007 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
|
May
(13) |
Jun
(8) |
Jul
|
Aug
(4) |
Sep
(8) |
Oct
(11) |
Nov
(10) |
Dec
(3) |
2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(7) |
Aug
|
Sep
(9) |
Oct
(3) |
Nov
(22) |
Dec
(7) |
2009 |
Jan
(11) |
Feb
(35) |
Mar
(4) |
Apr
(4) |
May
(5) |
Jun
(7) |
Jul
(9) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
2010 |
Jan
(4) |
Feb
(3) |
Mar
(14) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(20) |
Oct
(2) |
Nov
(14) |
Dec
(17) |
2011 |
Jan
(9) |
Feb
(5) |
Mar
(4) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(20) |
May
(16) |
Jun
(23) |
Jul
(5) |
Aug
(29) |
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(4) |
2013 |
Jan
(11) |
Feb
(7) |
Mar
(16) |
Apr
(17) |
May
(4) |
Jun
(8) |
Jul
(5) |
Aug
(4) |
Sep
(9) |
Oct
|
Nov
(13) |
Dec
(3) |
2014 |
Jan
(1) |
Feb
(9) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(7) |
Jul
|
Aug
|
Sep
(2) |
Oct
(6) |
Nov
(5) |
Dec
(5) |
2015 |
Jan
|
Feb
|
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2017 |
Jan
(9) |
Feb
(23) |
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(6) |
Sep
(6) |
Oct
|
Nov
(2) |
Dec
|
2018 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(29) |
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rolf E. <rol...@gm...> - 2019-09-15 10:33:02
|
<html><body><html><head><meta name="viewport" content="width=device-width" /><meta http-equiv="Content-Type" content="text/vnd.ui.insecure+html;charset=utf-8" /></head><body text="#000000" bgcolor="#FFFFFF" style="overflow-wrap:break-word; word-break: break-word;"><div class="mail_android_message" style="line-height: 1; padding: 0.5em"><br> </div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em">Am 15.09.19, 11:44, Rolf Ebert <rol...@gm...> schrieb:<blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <meta name="viewport" content="width=device-width" /><div class="mail_android_message" style="line-height: 1; padding: 0.5em">Hi Luke,<br /> <br /> the link command reads the specs file from device-specs/specs-avr2 instead of device-specs/specs-atmega328p.<br /> <br /> You overwrite the packages Compiler and Linker in your <a href="http://build.gpr">build.gpr</a>. Please compare your settings to the ones in <a href="http://avr_tools.gpr">avr_tools.gpr</a>, notably - - RTS and - XMCU. <br /> <br /> Unfortunately I don't have any access to a development computer for the next two weeks, so I can't verify myself.<br /> <br /> Rolf <br /> -- <br /> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.</div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em">Am 14.09.19, 22:41, "Luke A. Guest via Avr-ada-devel" <avr...@li...> schrieb:<blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <p>Hi,</p> <p>Getting weird linker errors due to missing libgcc.a symbols:</p> <p><br /> </p> <p>Using built-in specs.<br /> Reading specs from /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/device-specs/specs-avr2<br /> COLLECT_GCC=/home/laguest/opt/avr_92_gnat/bin/avr-gcc<br /> COLLECT_LTO_WRAPPER=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/lto-wrapper<br /> Target: avr<br /> Configured with: ../gcc-9.2.0/configure --prefix=/home/laguest/opt/avr_92_gnat --target=avr --enable-languages=ada,c,c++ --with-avrlibc --with-dwarf2 --disable-nls --disable-libssp --disable-libada --with-bugurl=<a class="moz-txt-link-freetext" href="http://avr-ada.sourceforge.net">http://avr-ada.sourceforge.net</a> --with-gmp=/usr --with-mpfr=/usr<br /> Thread model: single<br /> gcc version 9.2.0 (GCC) <br /> COMPILER_PATH=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/<br /> LIBRARY_PATH=/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/lib/<br /> COLLECT_GCC_OPTIONS='-v' '-L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/' '-L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/' '-L/home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/' '-L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/' '-static-libgcc' '-o' '/home/laguest/src/mine-new/build-avr-ada-toolchain/test//led_on' '-specs=device-specs/specs-avr2'<br /> /home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/collect2 -plugin /home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/liblto_plugin.so -plugin-opt=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccSMjLf1.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lc -o /home/laguest/src/mine-new/build-avr-ada-toolchain/test//led_on -L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/ -L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/ -L/home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/ -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/ -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0 -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/lib led_on.o b__led_on.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/ada.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/a-calend.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/interfac.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/system.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/s-unstyp.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/a-caldel.o /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/libgcc.a /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/libgnat.a --start-group -lgcc -lm -lc --end-group<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__julian_day':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:85: undefined reference to `__mulohisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:88: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:89: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__sub_second':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:181: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__split':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:251: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__julian_date':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:105: undefined reference to `__mulohisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:106: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:106: undefined reference to `__mulohisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:107: undefined reference to `__muluhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__minutes':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:446: undefined reference to `__usmulhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:446: undefined reference to `__usmulhisi3'<br /> /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__hours':<br /> /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:452: undefined reference to `__mulshisi3'<br /> collect2: error: ld returned 1 exit status<br /> gprbuild: link of led_on.adb failed<br /> </p> <p><br /> </p> <p>The source is:</p> <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #569cd6;">project</span><span style="color: #d4d4d4;"> Build </span><span style="color: #569cd6;">extends</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"avr_app.gpr"</span><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">is</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 2: the name of the project has to match the file name</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Main </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"led_on"</span><span style="color: #d4d4d4;">);</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 4: the name of the main program</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Object_Dir </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"obj"</span><span style="color: #d4d4d4;">;</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 6: hide the generated files in a subdir</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Exec_Dir </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"."</span><span style="color: #d4d4d4;">;</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 7: keep the main files in the current directory</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Source_Files </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"led_on.adb"</span><span style="color: #d4d4d4;">);</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 9: the list of required source files</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">package</span><span style="color: #d4d4d4;"> Compiler </span><span style="color: #569cd6;">is</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Switches </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"ada"</span><span style="color: #d4d4d4;">)</span><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"-Os"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-g"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-gnata"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-gnatwa"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-gnatQ"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-ffunction-sections"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-fdata-sections"</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> Compiler</span><span style="color: #d4d4d4;">;</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">package</span><span style="color: #d4d4d4;"> Builder </span><span style="color: #569cd6;">is</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Default_Switches </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"ada"</span><span style="color: #d4d4d4;">)</span><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">"-Os"</span><span style="color: #d4d4d4;">,</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-C"</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> Builder</span><span style="color: #d4d4d4;">;</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">package</span><span style="color: #d4d4d4;"> Linker </span><span style="color: #569cd6;">is</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">for</span><span style="color: #d4d4d4;"> Map_File_Option </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> </span><span style="color: #ce9178;">"-Wl,-Map,--gc-sections"</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> Linker</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> Build</span><span style="color: #d4d4d4;">;</span></div></div> <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div> <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #569cd6;">with</span><span style="color: #d4d4d4;"> AVR; </span><span style="color: #569cd6;">use</span><span style="color: #d4d4d4;"> AVR; </span><span style="color: #6a9955;">-- 1: make available general type definitions and names</span></div><div><span style="color: #569cd6;">with</span><span style="color: #d4d4d4;"> AVR.MCU; </span><span style="color: #6a9955;">-- 2: make use of the controller specific ports and pins</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 3:</span></div><div><span style="color: #569cd6;">procedure</span><span style="color: #d4d4d4;"> LED_On </span><span style="color: #569cd6;">is</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 4:</span></div><div><span style="color: #d4d4d4;"> LED : </span><span style="color: #4ec9b0;">Boolean</span><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">renames</span><span style="color: #d4d4d4;"> MCU.PortB_Bits (</span><span style="color: #b5cea8;">3</span><span style="color: #d4d4d4;">); </span><span style="color: #6a9955;">-- 5: rename controller pin 3 of port B to a name of</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 6: the problem domain</span></div><div><span style="color: #569cd6;">begin</span><span style="color: #d4d4d4;"> </span><span style="color: #6a9955;">-- 7:</span></div><div><span style="color: #d4d4d4;"> MCU.DDRB_Bits := (</span><span style="color: #569cd6;">others</span><span style="color: #d4d4d4;"> => DD_Output); </span><span style="color: #6a9955;">-- 8: set data direction of all pins of port B to output</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">loop</span></div><div><span style="color: #d4d4d4;"> LED := Low; </span><span style="color: #6a9955;">-- 9: draw output pin to low level, which turns on the LED</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #c586c0;">delay</span><span style="color: #d4d4d4;"> </span><span style="color: #b5cea8;">0.5</span><span style="color: #d4d4d4;">;</span></div> <div><span style="color: #d4d4d4;"> LED := High;</span></div> <div><span style="color: #d4d4d4;"> </span><span style="color: #c586c0;">delay</span><span style="color: #d4d4d4;"> </span><span style="color: #b5cea8;">0.5</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">loop</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #569cd6;">end</span><span style="color: #d4d4d4;"> LED_On; </span><span style="color: #6a9955;">-- 10:</span></div></div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;">I've tried adding libgcc.a to the -largs prt of avr-gnatmake, still same.</div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;">Building with: </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;">avr-gnatmake -p -XMCU=atmega328p -Pbuild.gpr -largs -v </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;">Luke.</div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div><div style="color: #d4d4d4;background-color: #1e1e1e;font-family: ''Fira Code'', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"> </div></div> <p><br /> </p> __ Avr-ada-devel mailing list Avr...@li... https://lists.sourceforge.net/lists/listinfo/avr-ada-devel</blockquote></div></blockquote></div></body></html></body></html> |
From: Rolf E. <rol...@gm...> - 2019-09-15 10:30:11
|
<html><body><html><head><meta name="viewport" content="width=device-width" /><meta http-equiv="Content-Type" content="text/vnd.ui.insecure+html;charset=utf-8" /></head><body style="overflow-wrap:break-word; word-break: break-word;"><div class="mail_android_message" style="line-height: 1; padding: 0.5em">The object file looks OK to me. The call to external functions is always shown as 0 in local object files. Alternatively you could disassemble the linked elf file or look at the generated intermediate assembler file.<br> <br> avr-objdump - d <a href="http://main.elf">main.elf</a> | less<br> <br> make led_on.s<br> less obj/led_on.s<br> <br> If you want to use delays you have to write "with <a href="http://AVR.real_time.clock">AVR.real_time.clock</a>;" in your main program.<br> <br> Rolf <br> -- <br> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.</div><div class="mail_android_quote" style="line-height: 1; padding: 0.3em">Am 14.09.19, 22:44, "Luke A. Guest via Avr-ada-devel" <avr...@li...> schrieb:<blockquote class="gmail_quote" style="margin: 0.8ex 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> Further to this, this is because I was trying to debug why the loop<br /> isn't happening and the delays seems too quick even with delay 1.0.<br /> <br /> The normal debug output for the object file is:<br /> <br /> <br /> $ avr-objdump -dS obj/led_on.o <br /> <br /> obj/led_on.o: file format elf32-avr<br /> <br /> <br /> Disassembly of section .text._ada_led_on:<br /> <br /> 00000000 <_ada_led_on>:<br /> -- 3:<br /> procedure LED_On is -- 4:<br /> LED : Boolean renames MCU.PortB_Bits (3); -- 5: rename controller pin 3 of port B to a name of<br /> -- 6: the problem domain<br /> begin -- 7:<br /> MCU.DDRB_Bits := (others => DD_Output); -- 8: set data direction of all pins of port B to output<br /> 0: 8f ef ldi r24, 0xFF ; 255<br /> 2: 84 b9 out 0x04, r24 ; 4<br /> <br /> loop<br /> LED := Low; -- 9: draw output pin to low level, which turns on the LED<br /> 4: 2b 98 cbi 0x05, 3 ; 5<br /> <br /> delay 0.5;<br /> 6: 64 ef ldi r22, 0xF4 ; 244<br /> 8: 71 e0 ldi r23, 0x01 ; 1<br /> a: 80 e0 ldi r24, 0x00 ; 0<br /> c: 90 e0 ldi r25, 0x00 ; 0<br /> e: 0e 94 00 00 call 0 ; 0x0 <_ada_led_on><br /> <br /> LED := High;<br /> 12: 2b 9a sbi 0x05, 3 ; 5<br /> <br /> delay 0.5;<br /> 14: 64 ef ldi r22, 0xF4 ; 244<br /> 16: 71 e0 ldi r23, 0x01 ; 1<br /> 18: 80 e0 ldi r24, 0x00 ; 0<br /> 1a: 90 e0 ldi r25, 0x00 ; 0<br /> 1c: 0e 94 00 00 call 0 ; 0x0 <_ada_led_on><br /> 20: 00 c0 rjmp .+0 ; 0x22 <__zero_reg__+0x21><br /> <br /> <br /> <br /> <br /> __<br /> Avr-ada-devel mailing list<br /> Avr...@li...<br /> <a href="https://lists.sourceforge.net/lists/listinfo/avr-ada-devel">https://lists.sourceforge.net/lists/listinfo/avr-ada-devel</a><br /> </blockquote></div></body></html></body></html> |
From: Luke A. G. <la...@ar...> - 2019-09-14 20:41:01
|
Further to this, this is because I was trying to debug why the loop isn't happening and the delays seems too quick even with delay 1.0. The normal debug output for the object file is: $ avr-objdump -dS obj/led_on.o obj/led_on.o: file format elf32-avr Disassembly of section .text._ada_led_on: 00000000 <_ada_led_on>: -- 3: procedure LED_On is -- 4: LED : Boolean renames MCU.PortB_Bits (3); -- 5: rename controller pin 3 of port B to a name of -- 6: the problem domain begin -- 7: MCU.DDRB_Bits := (others => DD_Output); -- 8: set data direction of all pins of port B to output 0: 8f ef ldi r24, 0xFF ; 255 2: 84 b9 out 0x04, r24 ; 4 loop LED := Low; -- 9: draw output pin to low level, which turns on the LED 4: 2b 98 cbi 0x05, 3 ; 5 delay 0.5; 6: 64 ef ldi r22, 0xF4 ; 244 8: 71 e0 ldi r23, 0x01 ; 1 a: 80 e0 ldi r24, 0x00 ; 0 c: 90 e0 ldi r25, 0x00 ; 0 e: 0e 94 00 00 call 0 ; 0x0 <_ada_led_on> LED := High; 12: 2b 9a sbi 0x05, 3 ; 5 delay 0.5; 14: 64 ef ldi r22, 0xF4 ; 244 16: 71 e0 ldi r23, 0x01 ; 1 18: 80 e0 ldi r24, 0x00 ; 0 1a: 90 e0 ldi r25, 0x00 ; 0 1c: 0e 94 00 00 call 0 ; 0x0 <_ada_led_on> 20: 00 c0 rjmp .+0 ; 0x22 <__zero_reg__+0x21> |
From: Luke A. G. <la...@ar...> - 2019-09-14 20:38:21
|
Hi, Getting weird linker errors due to missing libgcc.a symbols: Using built-in specs. Reading specs from /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/device-specs/specs-avr2 COLLECT_GCC=/home/laguest/opt/avr_92_gnat/bin/avr-gcc COLLECT_LTO_WRAPPER=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/lto-wrapper Target: avr Configured with: ../gcc-9.2.0/configure --prefix=/home/laguest/opt/avr_92_gnat --target=avr --enable-languages=ada,c,c++ --with-avrlibc --with-dwarf2 --disable-nls --disable-libssp --disable-libada --with-bugurl=http://avr-ada.sourceforge.net --with-gmp=/usr --with-mpfr=/usr Thread model: single gcc version 9.2.0 (GCC) COMPILER_PATH=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ LIBRARY_PATH=/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/:/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/lib/ COLLECT_GCC_OPTIONS='-v' '-L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/' '-L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/' '-L/home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/' '-L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/' '-static-libgcc' '-o' '/home/laguest/src/mine-new/build-avr-ada-toolchain/test//led_on' '-specs=device-specs/specs-avr2' /home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/collect2 -plugin /home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/liblto_plugin.so -plugin-opt=/home/laguest/opt/avr_92_gnat/libexec/gcc/avr/9.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccSMjLf1.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lc -o /home/laguest/src/mine-new/build-avr-ada-toolchain/test//led_on -L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/ -L/home/laguest/src/mine-new/build-avr-ada-toolchain/test/obj/ -L/home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/ -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/ -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0 -L/home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/lib led_on.o b__led_on.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/ada.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/a-calend.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/interfac.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/system.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/s-unstyp.o /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/a-caldel.o /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/libgcc.a /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/rts-avr5/adalib/libgnat.a --start-group -lgcc -lm -lc --end-group /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__julian_day': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:85: undefined reference to `__mulohisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:88: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:89: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__sub_second': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:181: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__split': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:251: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__julian_date': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:105: undefined reference to `__mulohisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:106: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:106: undefined reference to `__mulohisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:107: undefined reference to `__muluhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__minutes': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:446: undefined reference to `__usmulhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:446: undefined reference to `__usmulhisi3' /home/laguest/opt/avr_92_gnat/lib/gcc/avr/9.2.0/../../../../avr/bin/ld: /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/atmega328p/lib/libavrada.a(avr-real_time.o): in function `avr__real_time__hours': /home/laguest/opt/avr_92_gnat/avr/lib/gnat/avr_lib/avr-real_time.adb:452: undefined reference to `__mulshisi3' collect2: error: ld returned 1 exit status gprbuild: link of led_on.adb failed The source is: project Build extends "avr_app.gpr" is -- 2: the name of the project has to match the file name for Main use ("led_on"); -- 4: the name of the main program for Object_Dir use "obj"; -- 6: hide the generated files in a subdir for Exec_Dir use "."; -- 7: keep the main files in the current directory for Source_Files use ("led_on.adb"); -- 9: the list of required source files package Compiler is for Switches ("ada") use ("-Os", "-g", "-gnata", "-gnatwa", "-gnatQ", "-ffunction-sections", "-fdata-sections"); end Compiler; package Builder is for Default_Switches ("ada") use ("-Os", "-C"); end Builder; package Linker is for Map_File_Option use "-Wl,-Map,--gc-sections"; end Linker; end Build; with AVR; use AVR; -- 1: make available general type definitions and names with AVR.MCU; -- 2: make use of the controller specific ports and pins -- 3: procedure LED_On is -- 4: LED : Boolean renames MCU.PortB_Bits (3); -- 5: rename controller pin 3 of port B to a name of -- 6: the problem domain begin -- 7: MCU.DDRB_Bits := (others => DD_Output); -- 8: set data direction of all pins of port B to output loop LED := Low; -- 9: draw output pin to low level, which turns on the LED delay 0.5; LED := High; delay 0.5; end loop; end LED_On; -- 10: I've tried adding libgcc.a to the -largs prt of avr-gnatmake, still same. Building with: avr-gnatmake -p -XMCU=atmega328p -Pbuild.gpr -largs -v Luke. |
From: Rolf E. G. <rol...@gm...> - 2019-09-14 18:29:52
|
Am 14.09.2019 um 19:20 schrieb Luke A. Guest via Avr-ada-devel: > I cannot build gprbuild-2018 for avr to get a set of avr-gpr* tools. > > So, I've created a small patch to the makefiles to use the host's > gprbuild. Seems to work. > Thanks for the patch, Luke. That's what I already did in apps/examples and apps/i2c. I don't think that there is a avr-gprbuild. Gprbuild always only runs on the host machine. "gprbuild --target=avr" seems to be a working drop-in replacement for avr-gnatmake. I tried both, the original gprbuild for Debian and the latest one built from the Adacore Github repository. They both worked Ok for me. Rolf |
From: Luke A. G. <la...@ar...> - 2019-09-14 17:17:14
|
I cannot build gprbuild-2018 for avr to get a set of avr-gpr* tools. So, I've created a small patch to the makefiles to use the host's gprbuild. Seems to work. Luke. |
From: Rolf E. G. <rol...@gm...> - 2019-09-14 11:46:28
|
Hi Luke, thanks for also looking at AVR-Ada and its build script. Am 14.09.2019 um 11:27 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > On 9/14/19 12:43 AM, Luke A. Guest via Avr-ada-devel wrote: >> I thought i'd try to build the latest version from github only to find >> that it cannot download an avr-ada-1.9.0 because it doesn't exist. I >> don't know if that's a typo or there really should be a 1.9.0. > > Not a typo, work in progress, at the moment avr-ada resides at > https://sourceforge.net/p/avr-ada/code/ci/master/tree/ > Granted, must be written somewhere in the README or the build script, or > even better pulled directly from the build-script itself. Per and me, we had some private exchange about the progress of AVR-Ada. One day I changed AVR_Ada_Version_Minor in avr.ads (which still was 2) to tell myself that wanted to call the next release v2.0.0. If you want to follow the development before the official release you have to git-pull every now and then. > > I will be glad to do that at next convenient time. > In the current situation you - first have to run the script, - must not build avr-ada from within the script, - manually checkout the latest avr-ada, - walk into <avr-ada>/avr and - manually run 'make build_libs; make install_libs'. There is still a problem with the installation. That's why it is not yet included in the script. > >> Also, given you've modelled your scripts after mine, I'd expect them to >> be a bit more robust as to when the script fails, it shouldn't be trying >> to rebuild everything from scratch when you re-run it. You need to do >> some checks and touch some dot files so you can skip these builds, i.e. >> everything before avr-ada. > > In the current state (I think) we need to rebuild *everything* from the > ground up to ensure reproducible results, with binutils as a possible > exception. build_binutils="no" will solve that. > > I'm not even sure that I see the point in improving the build/install > dependency part - When it works, its a one-off process, and when it does > not work, the safer thing is to rebuild everything. > > ~Per In the upper part of the build script you can select what to build and what not to rebuild. The typical user selects build_gcc=yes and deletes the previous build folder. If you don't delete the build folder the script runs the typical 'make' command which simply recompiles what is necessary. That's how I check my patches. Perhaps you misunderstood my previous post. There is a problem with gprbuild-ing the AVR-libs (the manual step mentioned above). After installing the AVR libraries they will be recompiled by gprbuild with the first application that uses these libraries. That is due to storing the absolute path to gnat.adc in the respective ali files. As gnat.adc changes the absolute position within the file system by installing it (that's what installation is all about), gprbuild sees a different path and recompiles everything (where everything = all avr library files). That problem has nothing to do with the build scripts. Rolf |
From: Per D. J. <pd...@kn...> - 2019-09-14 09:28:08
|
On 9/14/19 12:43 AM, Luke A. Guest via Avr-ada-devel wrote: > I thought i'd try to build the latest version from github only to find > that it cannot download an avr-ada-1.9.0 because it doesn't exist. I > don't know if that's a typo or there really should be a 1.9.0. Not a typo, work in progress, at the moment avr-ada resides at https://sourceforge.net/p/avr-ada/code/ci/master/tree/ Granted, must be written somewhere in the README or the build script, or even better pulled directly from the build-script itself. I will be glad to do that at next convenient time. > Also, given you've modelled your scripts after mine, I'd expect them to > be a bit more robust as to when the script fails, it shouldn't be trying > to rebuild everything from scratch when you re-run it. You need to do > some checks and touch some dot files so you can skip these builds, i.e. > everything before avr-ada. In the current state (I think) we need to rebuild *everything* from the ground up to ensure reproducible results, with binutils as a possible exception. build_binutils="no" will solve that. I'm not even sure that I see the point in improving the build/install dependency part - When it works, its a one-off process, and when it does not work, the safer thing is to rebuild everything. ~Per |
From: Luke A. G. <la...@ar...> - 2019-09-13 22:57:24
|
Hi, I thought i'd try to build the latest version from github only to find that it cannot download an avr-ada-1.9.0 because it doesn't exist. I don't know if that's a typo or there really should be a 1.9.0. Also, given you've modelled your scripts after mine, I'd expect them to be a bit more robust as to when the script fails, it shouldn't be trying to rebuild everything from scratch when you re-run it. You need to do some checks and touch some dot files so you can skip these builds, i.e. everything before avr-ada. Thanks, Luke. |
From: Rolf E. G. <rol...@gm...> - 2019-09-11 05:18:42
|
At least the interface for using the secondary stack (s-secsta.ad?) has changed between gcc-4.9 and gcc-9.2. I will have to port that (and a few other functions) to the new compiler. Rolf |
From: Rolf E. G. <rol...@gm...> - 2019-09-08 16:37:19
|
Am 08.09.2019 um 17:56 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > Do you have a minimal working example with this behavior? (adb and > compile commands) Look into the new example AVR-Ada/apps/clock Rolf |
From: Per D. J. <pd...@kn...> - 2019-09-08 15:56:35
|
On 9/8/19 4:41 PM, Rolf Ebert GCC wrote: > It is not really a problem, after all. The compiler sometimes generates > "rcall 0", but that seems to be without any symptom. The code runs quite > well. See for example AVR.Real_Time.Clock > function AVR.Real_Time.Clock return Time is > 132: df 93 push r29 > 134: 00 d0 rcall .+0 ; 0x136 > <_ada_avr__real_time__clock+0x6> > 136: 00 d0 rcall .+0 ; 0x138 > <_ada_avr__real_time__clock+0x8> > 138: 00 d0 rcall .+0 ; 0x13a > <_ada_avr__real_time__clock+0xa> > 13a: cd b7 in r28, 0x3d ; 61 > 13c: de b7 in r29, 0x3e ; 62 > begin > return Clock_Impl.Now; RCALL 0 simply means "push current PC on the stack on continue from the next address". The "only" effect is the PC is pushed onto the stack 3 times (0x136, 0x138 and 0x13a). I believe that the netto-effect of the above code is that instructions from 0x13a and forward to the next RET is executed 4 times - That does not sound exactly right... Do you have a minimal working example with this behavior? (adb and compile commands) ~Per |
From: Per D. J. <pd...@kn...> - 2019-09-08 15:40:39
|
On 9/8/19 4:46 PM, Rolf Ebert GCC wrote: > Am 08.09.2019 um 15:32 schrieb Per Dalgas Jakobsen: >> On 9/7/19 11:17 PM, Rolf Ebert GCC wrote: >>> The new tool-chain based on gcc-9.2.0 generates nice looking assembler >>> code: >>> >>> >>> 00000090 <_ada_main_volatile>: >>> 90: 10 92 7a 00 sts 0x007A, r1 ; 0x80007a >>> 94: 80 e2 ldi r24, 0x20 ; 32 >>> 96: 80 93 7b 00 sts 0x007B, r24 ; 0x80007b >>> 9a: 80 91 00 01 lds r24, 0x0100 ; 0x800100 >>> 9e: 80 93 7c 00 sts 0x007C, r24 ; 0x80007c >>> a2: 10 92 7d 00 sts 0x007D, r1 ; 0x80007d >>> a6: 8f ef ldi r24, 0xFF ; 255 >>> a8: 80 93 7e 00 sts 0x007E, r24 ; 0x80007e >>> ac: 08 95 ret > I am not sure that you are right. As far as I remember you cannot write > a constant immediately to a RAM address. You always have to create the > value in a register before writing. Only the first few (32?) registers > that are overlays to the ports accept immediate values. Absolutely - however, the issue above is that the value written to 0x007C is loaded into r24 from SRAM address 0x0100 instead of being loaded directly into r24 as an immediate. In the initialization code the constant is written to SRAM - Waste of instructions, waste of SRAM with absolutely no benefit. The right code at 9e should be "ldi r24, <constant>" ~Per |
From: Rolf E. G. <rol...@gm...> - 2019-09-08 14:46:50
|
Am 08.09.2019 um 15:32 schrieb Per Dalgas Jakobsen: > On 9/7/19 11:17 PM, Rolf Ebert GCC wrote: >> The new tool-chain based on gcc-9.2.0 generates nice looking assembler >> code: >> >> >> 00000090 <_ada_main_volatile>: >> 90: 10 92 7a 00 sts 0x007A, r1 ; 0x80007a >> 94: 80 e2 ldi r24, 0x20 ; 32 >> 96: 80 93 7b 00 sts 0x007B, r24 ; 0x80007b >> 9a: 80 91 00 01 lds r24, 0x0100 ; 0x800100 >> 9e: 80 93 7c 00 sts 0x007C, r24 ; 0x80007c >> a2: 10 92 7d 00 sts 0x007D, r1 ; 0x80007d >> a6: 8f ef ldi r24, 0xFF ; 255 >> a8: 80 93 7e 00 sts 0x007E, r24 ; 0x80007e >> ac: 08 95 ret > > This is much better than before for sure, but there are still an issue > on address 9a above: It is a constant that is put into SRAM (initialized > variable). There is absolutely no reason for using SRAM for this. 9a > should just have been an LDI-instruction with the calculated constant, > faster and smaller. > > I mentioned this at the previous bug-report, but they believed the > problem is located in the AVR backend. Now that I can see the generated > code after the bug-fix, I will report this to gcc AVR backend. Hopefully > they will fix it then :) > I am not sure that you are right. As far as I remember you cannot write a constant immediately to a RAM address. You always have to create the value in a register before writing. Only the first few (32?) registers that are overlays to the ports accept immediate values. Rolf |
From: Rolf E. G. <rol...@gm...> - 2019-09-08 14:41:50
|
It is not really a problem, after all. The compiler sometimes generates "rcall 0", but that seems to be without any symptom. The code runs quite well. See for example AVR.Real_Time.Clock $ tail avr-real_time-clock.adb --------------------------------------------------------------------------- with AVR.Real_Time; use AVR.Real_Time; with AVR.Real_Time.Clock_Impl; pragma Elaborate_All (AVR.Real_Time.Clock_Impl); function AVR.Real_Time.Clock return Time is begin return Clock_Impl.Now; end AVR.Real_Time.Clock; And the relevant part in main.lss from the new clock example: 00000130 <_ada_avr__real_time__clock>: 130: cf 93 push r28 with AVR.Real_Time; use AVR.Real_Time; with AVR.Real_Time.Clock_Impl; pragma Elaborate_All (AVR.Real_Time.Clock_Impl); function AVR.Real_Time.Clock return Time is 132: df 93 push r29 134: 00 d0 rcall .+0 ; 0x136 <_ada_avr__real_time__clock+0x6> 136: 00 d0 rcall .+0 ; 0x138 <_ada_avr__real_time__clock+0x8> 138: 00 d0 rcall .+0 ; 0x13a <_ada_avr__real_time__clock+0xa> 13a: cd b7 in r28, 0x3d ; 61 13c: de b7 in r29, 0x3e ; 62 begin return Clock_Impl.Now; 13e: 86 e0 ldi r24, 0x06 ; 6 140: e6 e0 ldi r30, 0x06 ; 6 142: f1 e0 ldi r31, 0x01 ; 1 144: de 01 movw r26, r28 146: 11 96 adiw r26, 0x01 ; 1 148: 01 90 ld r0, Z+ 14a: 0d 92 st X+, r0 14c: 8a 95 dec r24 14e: e1 f7 brne .-8 ; 0x148 <_ada_avr__real_time__clock+0x18> 150: 29 81 ldd r18, Y+1 ; 0x01 See the instructions at addresses 134, 136, 138. I don't think they do anything useful. And I also verified that we have them at least since version 4.7. I ignore that part for the time being. Rolf Am 08.09.2019 um 15:26 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > On 9/5/19 10:45 PM, Rolf Ebert GCC wrote: >> I have just seen that gcc-9.2 sometimes generates calls as "rcall .". > > RCALL (1 word, 3 cycles) can be used when sub-routine is within 2K-words > of the caller. > > CALL (2 words, 4 cycles) is needed for longer calls. > > >> They seem to originate from suppressed run-time-checks. I don't know how >> to get rid of them. > Is it generating RCALLs for calls beyond 2K-words, or additional calls > of some kind? > > I don't understand the problem... > > ~Per > > > > > > __ > Avr-ada-devel mailing list > Avr...@li... > https://lists.sourceforge.net/lists/listinfo/avr-ada-devel > |
From: Per D. J. <pd...@kn...> - 2019-09-08 13:32:46
|
On 9/7/19 11:17 PM, Rolf Ebert GCC wrote: > The new tool-chain based on gcc-9.2.0 generates nice looking assembler > code: > > > 00000090 <_ada_main_volatile>: > 90: 10 92 7a 00 sts 0x007A, r1 ; 0x80007a > 94: 80 e2 ldi r24, 0x20 ; 32 > 96: 80 93 7b 00 sts 0x007B, r24 ; 0x80007b > 9a: 80 91 00 01 lds r24, 0x0100 ; 0x800100 > 9e: 80 93 7c 00 sts 0x007C, r24 ; 0x80007c > a2: 10 92 7d 00 sts 0x007D, r1 ; 0x80007d > a6: 8f ef ldi r24, 0xFF ; 255 > a8: 80 93 7e 00 sts 0x007E, r24 ; 0x80007e > ac: 08 95 ret This is much better than before for sure, but there are still an issue on address 9a above: It is a constant that is put into SRAM (initialized variable). There is absolutely no reason for using SRAM for this. 9a should just have been an LDI-instruction with the calculated constant, faster and smaller. I mentioned this at the previous bug-report, but they believed the problem is located in the AVR backend. Now that I can see the generated code after the bug-fix, I will report this to gcc AVR backend. Hopefully they will fix it then :) |
From: Per D. J. <pd...@kn...> - 2019-09-08 13:26:42
|
On 9/5/19 10:45 PM, Rolf Ebert GCC wrote: > I have just seen that gcc-9.2 sometimes generates calls as "rcall .". RCALL (1 word, 3 cycles) can be used when sub-routine is within 2K-words of the caller. CALL (2 words, 4 cycles) is needed for longer calls. > They seem to originate from suppressed run-time-checks. I don't know how > to get rid of them. Is it generating RCALLs for calls beyond 2K-words, or additional calls of some kind? I don't understand the problem... ~Per |
From: Rolf E. G. <rol...@gm...> - 2019-09-07 21:17:25
|
> I'm ultimately aiming for an AVR-Ada toolchain based on gcc 9.1.1 or > newer, as I've reported and got fixed an error in the GCC compiler, > which I would like to have in my toolchain: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131 The new tool-chain based on gcc-9.2.0 generates nice looking assembler code: 00000090 <_ada_main_volatile>: 90: 10 92 7a 00 sts 0x007A, r1 ; 0x80007a 94: 80 e2 ldi r24, 0x20 ; 32 96: 80 93 7b 00 sts 0x007B, r24 ; 0x80007b 9a: 80 91 00 01 lds r24, 0x0100 ; 0x800100 9e: 80 93 7c 00 sts 0x007C, r24 ; 0x80007c a2: 10 92 7d 00 sts 0x007D, r1 ; 0x80007d a6: 8f ef ldi r24, 0xFF ; 255 a8: 80 93 7e 00 sts 0x007E, r24 ; 0x80007e ac: 08 95 ret |
From: Rolf E. G. <rol...@gm...> - 2019-09-05 20:45:39
|
I have just seen that gcc-9.2 sometimes generates calls as "rcall .". They seem to originate from suppressed run-time-checks. I don't know how to get rid of them. Rolf |
From: Rolf E. G. <rol...@gm...> - 2019-08-25 19:49:50
|
Am 25.08.2019 um 18:25 schrieb Per Dalgas Jakobsen: > On 8/25/19 5:51 PM, Rolf Ebert GCC wrote: > which avr-ada have > you checked out? > I have just pushed my latest commits of AVR-Ada to the github repository. There were only minor changes to yesterday's version. Rolf |
From: Per D. J. <pd...@kn...> - 2019-08-25 16:25:31
|
On 8/25/19 5:51 PM, Rolf Ebert GCC wrote: > I'm using gcc-9.2 No, I meant besides your script (complete checkout), which avr-ada have you checked out? |
From: Rolf E. G. <rol...@gm...> - 2019-08-25 15:51:47
|
Am 25.08.2019 um 16:49 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > On 8/25/19 4:46 PM, Per Dalgas Jakobsen via Avr-ada-devel wrote: >> Yeah, I know - I have a checked out >> https://github.com/evilspacepirate/avr-ada.git , went into the avr-ada >> directory executed "make build_libs", but it fails with: >> >> gprconfig --batch --target=avr \ >> --config=Asm,8.3.0 \ >> --config=Asm2,8.3.0 \ >> --config=Asm_Cpp,8.3.0 \ >> --config=C,8.3.0 \ >> -o local-avr.cgpr >> Error: unknown language 'Asm' >> Error: unknown language 'Asm2' >> Error: unknown language 'Asm_Cpp' >> Error: unknown language 'C' >> Ambiguous variable substitution, need to specify the language (in TARGET) >> Invalid setup of the gprconfig knowledge base > > Hmm, somethings odd here: 8.3 ?!? > > I've started making another fresh build... I was able to generate a compiler config after having installed the RTSs with the prefix rts-<<arch>>. The command has still be cleaned up but the starting point can be found in build-avr-ada-toolchain/rts/gcc-9/Makefile at line 153. >> Instead of fighting that version, I should probably use the same version >> you are using. > I don't think that the (mis)behaviour depends on gcc-8 vs gcc-9. It is a difference between gcc-4.9 (perhaps also gcc-5 and gcc-6) on one side and gcc-8/9 on the other side. > Still applies I think :) I'm using gcc-9.2 Rolf |
From: Per D. J. <pd...@kn...> - 2019-08-25 14:49:18
|
On 8/25/19 4:46 PM, Per Dalgas Jakobsen via Avr-ada-devel wrote: > Yeah, I know - I have a checked out > https://github.com/evilspacepirate/avr-ada.git , went into the avr-ada > directory executed "make build_libs", but it fails with: > > gprconfig --batch --target=avr \ > --config=Asm,8.3.0 \ > --config=Asm2,8.3.0 \ > --config=Asm_Cpp,8.3.0 \ > --config=C,8.3.0 \ > -o local-avr.cgpr > Error: unknown language 'Asm' > Error: unknown language 'Asm2' > Error: unknown language 'Asm_Cpp' > Error: unknown language 'C' > Ambiguous variable substitution, need to specify the language (in TARGET) > Invalid setup of the gprconfig knowledge base Hmm, somethings odd here: 8.3 ?!? I've started making another fresh build... > Instead of fighting that version, I should probably use the same version > you are using. Still applies I think :) ~Per |
From: Per D. J. <pd...@kn...> - 2019-08-25 14:46:58
|
On 8/25/19 4:33 PM, Rolf Ebert GCC wrote: > Am 25.08.2019 um 16:30 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > > building the AVR-Ada libraries only works if you manually go into a > checked out repository of AVR-Ada. It does not yet work from the build > script! Yeah, I know - I have a checked out https://github.com/evilspacepirate/avr-ada.git , went into the avr-ada directory executed "make build_libs", but it fails with: gprconfig --batch --target=avr \ --config=Asm,8.3.0 \ --config=Asm2,8.3.0 \ --config=Asm_Cpp,8.3.0 \ --config=C,8.3.0 \ -o local-avr.cgpr Error: unknown language 'Asm' Error: unknown language 'Asm2' Error: unknown language 'Asm_Cpp' Error: unknown language 'C' Ambiguous variable substitution, need to specify the language (in TARGET) Invalid setup of the gprconfig knowledge base Instead of fighting that version, I should probably use the same version you are using. > Even compiling the libraries doesn't help as you cannot link against the > libraries. Yeah, I read your previous mail. I hope we get it fixed somehow - Anything I can do to help here? |
From: Rolf E. G. <rol...@gm...> - 2019-08-25 14:33:53
|
Am 25.08.2019 um 16:30 schrieb Per Dalgas Jakobsen via Avr-ada-devel: > On 8/23/19 10:45 PM, Rolf Ebert GCC wrote: >> It should not be necessary to copy the RTS to the local project dir >> anymore. Please confirm that it works for you. > > I've checked out the latest master (the one including my sudo cleanup), > made a clean build, but avr-ada still fails. building the AVR-Ada libraries only works if you manually go into a checked out repository of AVR-Ada. It does not yet work from the build script! Even compiling the libraries doesn't help as you cannot link against the libraries. Rolf |