Recent

Author Topic: free pascal pi pico. can't open executable. ( .elf )  (Read 5473 times)

jb007

  • Full Member
  • ***
  • Posts: 145
free pascal pi pico. can't open executable. ( .elf )
« on: October 29, 2023, 04:26:48 pm »
Hi,

first checked this side for this error, but nothing found.

The error just apeared. Checked multiple programms, same error.

e.q.:

Compile Project, Mode: Raspberry Pi Pico, OS: embedded, CPU: arm, Target: C:\Users\cobal\OneDrive\projects Laz Pico\pico-fpcexamples-main\pico-fpcexamples-main\i2c_scan\bin\i2c_scan.elf: Exit code 1, Errors: 1, Hints: 2
Hint: Start of reading config file C:\fpcLaz_Pico\fpc\bin\x86_64-win64\fpc.cfg
Hint: End of reading config file C:\fpcLaz_Pico\fpc\bin\x86_64-win64\fpc.cfg
Verbose: Free Pascal Compiler version 3.3.1-9929-g8d63a1ddfd [2022/01/18] for arm
Verbose: Copyright (c) 1993-2022 by Florian Klaempfl and others
Verbose: Target OS: Embedded
Verbose: Compiling i2c_scan.lpr
Verbose: Assembling i2c_scan
Verbose: Linking C:\Users\cobal\OneDrive\projects Laz Pico\pico-fpcexamples-main\pico-fpcexamples-main\i2c_scan\bin\i2c_scan
i2c_scan.lpr(57,0) Error: Can't open executable "C:\Users\cobal\OneDrive\projects Laz Pico\pico-fpcexamples-main\pico-fpcexamples-main\i2c_scan\bin\i2c_scan.elf"
Verbose: Compilation aborted
Verbose: C:\fpcLaz_Pico\fpc\bin\x86_64-win64\ppcrossarm.exe returned an error exitcode

Things worked before...


Checked the directory:

Tnx in advance! Marcel
to DIY or not to DIY

TRon

  • Hero Member
  • *****
  • Posts: 3791
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #1 on: October 29, 2023, 04:33:28 pm »
Does it work when you (cross) compile on a local drive ?
I do not have to remember anything anymore thanks to total-recall.

AlexTP

  • Hero Member
  • *****
  • Posts: 2520
    • UVviewsoft
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #2 on: October 29, 2023, 04:37:59 pm »
Verbose: Free Pascal Compiler version 3.3.1-9929-g8d63a1ddfd [2022/01/18] for arm

It is too old 3.3, it's better to update to last Git version.

cdbc

  • Hero Member
  • *****
  • Posts: 1779
    • http://www.cdbc.dk
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #3 on: October 29, 2023, 05:48:29 pm »
Hi
I've seen the compiler write this: "Can't open executable", before...
It was when I accidently had the app running for test in a console-window, so it was locked for the compiler to write to...
Could that be it?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

TRon

  • Hero Member
  • *****
  • Posts: 3791
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #4 on: October 29, 2023, 05:59:11 pm »
There are actually two separate sins:
- compiling on a 3th party (external) filesystem
- using spaces in a project name/path

Something to do with reaping and sowing if I remember correctly  :)
I do not have to remember anything anymore thanks to total-recall.

jb007

  • Full Member
  • ***
  • Posts: 145
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #5 on: October 30, 2023, 11:53:22 am »
Tnx for all your replies!

As said before, it worked, don't know what I may have done.
I just hadn't use lac/fpc for a few weeks.


Got it working finaly, here a brief story:


Does it work when you (cross) compile on a local drive ?

Done that, but same error!


Verbose: Free Pascal Compiler version 3.3.1-9929-g8d63a1ddfd [2022/01/18] for arm

It is too old 3.3, it's better to update to last Git version.

Reinstalled, and tried compile from onedrive-dir an local-dir: same error


There are actually two separate sins:
- compiling on a 3th party (external) filesystem
- using spaces in a project name/path

Something to do with reaping and sowing if I remember correctly  :)


Next I. made a new project dir on local C:\picoProjects
A path WITHOUT spaces: no errors!


I'm very happy I can continue with coding my pico!

Tnx again!



For those interested: made a pcb with a pico attached on it.
For my rc diy truck, to control all the light stuff, like ws2812b-bars and ws2812b-'matrixes'and regular (power) leds.
https://www.youtube.com/playlist?list=PLcCKmeWXkrzRoul43A6f0xf8baJPggiu0
« Last Edit: October 30, 2023, 12:19:30 pm by jb007 »
to DIY or not to DIY

dbannon

  • Hero Member
  • *****
  • Posts: 3194
    • tomboy-ng, a rewrite of the classic Tomboy
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #6 on: October 30, 2023, 12:34:18 pm »
I'd really like to be wrong here but what I have done with the Pico required me to use a special version of FPC 3.2.2 that had been patched by Michael and available via fpcupdeluxe ??

I'd hope Michael's patches had made it into FPC main but not seen any evidence they had.

But I do also like TRon's answer .....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jb007

  • Full Member
  • ***
  • Posts: 145
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #7 on: October 30, 2023, 01:08:12 pm »
Made also a new fresh ( spaceless ) path on OneDrive and things work fine there also!
to DIY or not to DIY

dbannon

  • Hero Member
  • *****
  • Posts: 3194
    • tomboy-ng, a rewrite of the classic Tomboy
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #8 on: October 31, 2023, 12:21:50 am »
Excellent !

JB, just for the record, you are running FPC main here, is that just a direct install of main without any patches applied ?  Or did you install using FPCUPDELUXE (which I suspect puts Michael's patches on as you install) ?

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jb007

  • Full Member
  • ***
  • Posts: 145
Re: free pascal pi pico. can't open executable. ( .elf )
« Reply #9 on: October 31, 2023, 12:20:27 pm »
Hi,

previous install and current install ( LAZ/fpc) are done by using fpcupdeluxe.

From the very start of LAZ/fpc-pico ( last year ) I'm using a dedicated projects folder ( path ).
There I placed the  'michaels' examples-folder and from that folder I also create new projects.
( things worked fine, till some days ago )

Have a second 'independend' installation of LAZ/fpc for windows applications.

All the time worked with oneDrive, but with with a local oneDrive folder. This folder is also stored solid on my pc.

I don't know anything and I'm not aware of Micheal's patches.

Have to find out what it's all about.

Marcel





to DIY or not to DIY

 

TinyPortal © 2005-2018