Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-05

Cortex-M0 (SAMD21G18A) and gcc-arm-none-eabi-8-2018-q4-major-win32

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

Hi,

  yesterday I tried ( for first time ) to use the fpc for arm with the gcc-arm-none-eabi-8-2018-q4-major-win32 toolchain and I got this error :

"G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin\arm-none-eabi-objcopy.exe: G:\Programming\dimitris\tools\mbf\Samples\Blinky\Blinky.hex 64-bit address 0x4b4fa300000000 out of range for Intel Hex file"

As I'm not familiar with ARM, does anyone have a clue or a hint on what I'm doing wrong ?

FYI,

FPC trunk builded with :

">make.exe clean crossall crossinstall OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv6m CROSSOPT="-O1"
INSTALL_PREFIX=G:\Programming\dimitris\tools\fpc-trunk CROSSBINDIR=G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin BINUTILSPREFIX=arm-none-eabi-"

and the

project options are :

"G:\Programming\dimitris\tools\fpc-trunk\bin\x86_64-win64\fpc.exe -Tembedded
-Parm
-MObjFPC
-Scgi
-Ch8192
-Cs8192
-O1
-gw2
-l
-vewnhibq
-Fi..\..\Source
-Filib\arm-embedded
-Fu..\..\Source
-Fu.
-FUlib\arm-embedded
-FE.
-oBlinky
-Cparmv6m
-XParm-none-eabi-
-Wparduinozero"

PS: I used the "Microcontroller Board Framework" ( https://github.com/michael-ring/mbf ) from Michael Ring cause the official FPC doesn't have my MCU ( ATSAMD21G18A ).

regards,

Dimitrios Chr. Ioannidis

Reply by email

Christo Crause
to Dimitrios Chr. Ioannidis

On Sun, May 26, 2019 at 9:16 AM Dimitrios Chr. Ioannidis via fpc-devel <

Show quoted text 7 lines
wrote: "G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin\arm-none-eabi-objcopy.exe: G:\Programming\dimitris\tools\mbf\Samples\Blinky\Blinky.hex 64-bit address 0x4b4fa300000000 out of range for Intel Hex file" http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

I suspect the problem is with objcopy, not FPC. This bug report ( https://sourceware.org/bugzilla/show_bug.cgi?id=24065) mention a problem if the target is 64 bit and the host is 32 bit. Check if you can get a recent version of objcopy, or try the 64 bit version of the arm binutils (I assume you have a 64 bit Windows machine)

Reply by email

Dimitrios Chr. Ioannidis
to Christo Crause

Hi Christo,

Στις 26/5/2019 11:10 π.μ., ο Christo Crause έγραψε:

Show quoted text 17 lines
On Sun, May 26, 2019 at 9:16 AM Dimitrios Chr. Ioannidis via fpc-devel < > wrote: "G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin\arm-none-eabi-objcopy.exe: G:\Programming\dimitris\tools\mbf\Samples\Blinky\Blinky.hex 64-bit address 0x4b4fa300000000 out of range for Intel Hex file"http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel I suspect the problem is with objcopy, not FPC. This bug report (https://sourceware.org/bugzilla/show_bug.cgi?id=24065) mention a problem if the target is 64 bit and the host is 32 bit.  Check if you can get a recent version of objcopy, or try the 64 bit version of the arm binutils (I assume you have a 64 bit Windows machine)

Great find !

In this bug report there is a link for a patched toolchain . I'll try it later today to see how it goes.

PS: I don't see any commits reg. AVR's. Do you have any insight if some of the AVR bug reports ( stack error checking,  DIV, etc ) will be fixed / resolved ?

regards.

Dimitrios Chr. Ioannidis

Reply by email

christo
to Dimitrios Chr. Ioannidis: Στις 26/5/2019 11:10 π.μ., ο Christo Crause έγραψε: Great find ! In this bug…
Dimitrios Chr. Ioannidis wrote 14 lines
Hi Christo, PS: I don't see any commits reg. AVR's. Do you have any insight if some of the AVR bug reports ( stack error checking,  DIV, etc ) will be fixed / resolved ? regards. -- Dimitrios Chr. Ioannidis

Hi Dimitrios,

I have no indication or further communication from the compiler team regarding the open items in the bug tracker. If you are interested in testing FPC with all my AVR patches you can get the source here: https://github.com/ccrause/freepascal. Note that I don't continuously integrate that fork with upstream trunk, it is about 2 months behind at the moment.

Reply by email

Michael Ring
to Dimitrios Chr. Ioannidis:   yesterday I tried ( for first time ) to use the fpc for arm with the…

Just one note of caution:

When you encounter strange behaviour of your Code on Cortex-M0 in respect to DIV commmand then check the mailinglist, Jeppe has provided a fix but I am not quite sure if the fix has made it into official trunk.

Michael

Dimitrios Chr. Ioannidis wrote 64 lines
Hi,   yesterday I tried ( for first time ) to use the fpc for arm with the gcc-arm-none-eabi-8-2018-q4-major-win32 toolchain and I got this error : "G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin\arm-none-eabi-objcopy.exe: G:\Programming\dimitris\tools\mbf\Samples\Blinky\Blinky.hex 64-bit address 0x4b4fa300000000 out of range for Intel Hex file" As I'm not familiar with ARM, does anyone have a clue or a hint on what I'm doing wrong ? FYI, FPC trunk builded with : ">make.exe clean crossall crossinstall OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv6m CROSSOPT="-O1" INSTALL_PREFIX=G:\Programming\dimitris\tools\fpc-trunk CROSSBINDIR=G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin BINUTILSPREFIX=arm-none-eabi-" and the project options are : "G:\Programming\dimitris\tools\fpc-trunk\bin\x86_64-win64\fpc.exe -Tembedded -Parm -MObjFPC -Scgi -Ch8192 -Cs8192 -O1 -gw2 -l -vewnhibq -Fi..\..\Source -Filib\arm-embedded -Fu..\..\Source -Fu. -FUlib\arm-embedded -FE. -oBlinky -Cparmv6m -XParm-none-eabi- -Wparduinozero" PS: I used the "Microcontroller Board Framework" ( https://github.com/michael-ring/mbf ) from Michael Ring cause the official FPC doesn't have my MCU ( ATSAMD21G18A ). regards, -- Dimitrios Chr. Ioannidis _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Dimitrios Chr. Ioannidis
to Michael Ring

Hi Michael,

Michael Ring wrote 6 lines
Just one note of caution: When you encounter strange behaviour of your Code on Cortex-M0 in respect to DIV commmand then check the mailinglist, Jeppe has provided a fix but I am not quite sure if the fix has made it into official trunk.

thx for the hint.

By the way, any chance for inclusion your MCU definitions if official FPC ?

regards,

Dimitrios Chr. Ioannidis

Reply by email

Michael Ring
to Dimitrios Chr. Ioannidis

Quite a number is already in on trunk, but as the support for devices is getting bigger and bigger (at least on my harddisc) there is a need for an inteligent mechanism to handle the huge amount of devices as the header files eat up a lot of space in svn and only a very few will actually get used.

Jeppe once had provided a nice mechanism to me but it never made it to trunk. From the last comment of Florian on the topic the door id open for implementing something that makes handling easier, but honestly I did not spend much time on this.

Do you use a board like the Arduino Zero or do you work with plain, not pre-programmed chips?

I am asking because in case you use Arduino Zero there will be some obstacles for you to get rid of the preinstalled bootloader that you will most likely have to face.

Contact me in that case, I have already been down that road and have a working solution. (see
https://learn.adafruit.com/proper-step-debugging-atsamd21-arduino-zero-m0/restoring-bootloader)

Michael

Dimitrios Chr. Ioannidis wrote 17 lines
Hi Michael, On 2019-05-26 14:14, Michael Ring wrote: > Just one note of caution: > > When you encounter strange behaviour of your Code on Cortex-M0 in > respect to DIV commmand then check the mailinglist, Jeppe has provided > a fix but I am not quite sure if the fix has made it into official > trunk. thx for the hint. By the way, any chance for inclusion your MCU definitions if official FPC ? regards,

Reply by email

Jeppe Johansen
to Michael Ring: Just one note of caution: When you encounter strange behaviour of your Code on Cortex-M0…

It's been snuck in now :)

Michael Ring wrote 79 lines
Just one note of caution: When you encounter strange behaviour of your Code on Cortex-M0 in respect to DIV commmand then check the mailinglist, Jeppe has provided a fix but I am not quite sure if the fix has made it into official trunk. Michael Am 26.05.19 um 09:15 schrieb Dimitrios Chr. Ioannidis via fpc-devel: > > Hi, > >   yesterday I tried ( for first time ) to use the fpc for arm with > the gcc-arm-none-eabi-8-2018-q4-major-win32 toolchain and I got this > error : > > "G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin\arm-none-eabi-objcopy.exe: > G:\Programming\dimitris\tools\mbf\Samples\Blinky\Blinky.hex 64-bit > address 0x4b4fa300000000 out of range for Intel Hex file" > > As I'm not familiar with ARM, does anyone have a clue or a hint on > what I'm doing wrong ? > > FYI, > > FPC trunk builded with : > > ">make.exe clean crossall crossinstall OS_TARGET=embedded > CPU_TARGET=arm SUBARCH=armv6m CROSSOPT="-O1" > INSTALL_PREFIX=G:\Programming\dimitris\tools\fpc-trunk > CROSSBINDIR=G:\Programming\dimitris\tools\gcc-arm-none-eabi\bin > BINUTILSPREFIX=arm-none-eabi-" > > and the > > project options are : > > "G:\Programming\dimitris\tools\fpc-trunk\bin\x86_64-win64\fpc.exe > -Tembedded > -Parm > -MObjFPC > -Scgi > -Ch8192 > -Cs8192 > -O1 > -gw2 > -l > -vewnhibq > -Fi..\..\Source > -Filib\arm-embedded > -Fu..\..\Source > -Fu. > -FUlib\arm-embedded > -FE. > -oBlinky > -Cparmv6m > -XParm-none-eabi- > -Wparduinozero" > > PS: I used the "Microcontroller Board Framework" ( > https://github.com/michael-ring/mbf ) from Michael Ring cause the > official FPC doesn't have my MCU ( ATSAMD21G18A ). > > > regards, > > -- > > Dimitrios Chr. Ioannidis > > > _______________________________________________ > fpc-devel maillist > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email