Lazarus
Free Pascal => Beginners => Topic started by: jb007 on July 03, 2022, 07:54:55 pm
-
Hi,
allready coding in lazarus for some years.
Mostly in combination with microcontrollers.
PC-side: LAZARUS
<- serial (rx/tx) cominication ->
mController-side: Arduino/AVR: mircoPascal for AVR ( from www.mikrroe.com )
Next step is coding in Pascal for the rtaspberry pi PICO.
I did a full PICO ( inlcuding lazarus ) install by using FPCUPdeluxe from
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
selected: fpcupdeluxe-x86_64-win64.exe
Install with no errors.
How do I, during creating a new project, choose that I want a project for the pi PICO?
Allready struggling for a while...
Tnx in advance. Marcel
-
"Raspberry", it seems nice electronic piece. One day I'll program one of it, I can't get one in my current state.
-
How do I, during creating a new project, choose that I want a project for the pi PICO?
You have created a crosscompiler for pi PICO with fpcupdeluxe. In your project-options (Menu->Project-Project Option) you can set in CompilerOption->Config and Target the correct Target (embedded), Target CPU (arm) and processor. (I dont know the actual value for the pico).
You must not define it at projectstart and you can have multiple targets in one project (one of a lot of Lazarus featrues)
-
See thread at https://forum.lazarus.freepascal.org/index.php/topic,59458.0.html
MarkMLl
-
Tnx for your replies.
-
Hi, tnx things make sence now!
Did re-instal, for sure.
By sellecting PICO in fpcupdeluxe, FPC version chooses automaticly embedded, and LAzarus version automaticly chooses trunk.
Checked the pi PICO specs: Dual-core ARM Cortex-M0+
In Lazarus I went to options for project and choose:
Target OS-(T): embedded
Target CPU family (-P) arm
Target processor (-Cp) *
* there's only CORTEXM3 to choose
Just gonna try and see what happens...
-
Got it work!
Please, forget my previous post...
First PICO code ( downloaded ) works:
https://www.youtube.com/watch?v=b_BQrss9fFQ&list=PLcCKmeWXkrzR-TF-brJ70j5iTeTsDj8cT&index=17
-
The happynes wasn't for long...
-
So what exactly did you do to get that?
Was this from the editor, compiler, debugger...
MarkMLl
-
Hi,
before I got this error, I have opened that UNIT window.
I'm pretty sure I left that screen open when closing Lazarus.
The error apears every time I start Lazarus.
What I'm gonna try: open lazarus with my lates project where I openend that UNIT screen.
projectX: opoen with lazarus.
I'll post it later this day what happens.
-
Didn't manage to get Laz run again without the error.
Here's what I did next:
- removed Laz
- installed via fpcupdeluxe, setup for pi PICO
- started Laz
- opened example-blinky
- via File: quit Laz
- started Laz: blinky loaded within automaticly
- opened units-dependencies
- closed units-dependencies
- via File: quit Laz
- started Laz: blinky loaded within automaticly
- opened units dependencies
- quit Laz ( with blinky within. And unit-dependencies-window displayed )
- started Laz: blinky loaded within automaticly
unit-dependencies-windows displayed within (automaticly)
- via Project: close project: blinky closes, unit-dependencies stays
project wizard opens
- with unit dependencies still displayed: selected quit-Laz
- started Laz: ERROR!
Managed to recreate the error!
-
Managed to recreate the error!
You need to add to that the version of Lazarus etc., at the very least the info presented by Help -> About Lazarus.
Please make sure it goes into the body of the message, not your sig.
You might need to save that project in case somebody asks you to raise a bug report.
I'm still trying to pick up the pieces after a system blowup a couple of weeks ago, if I can I'll try to duplicate it but it won't be immediate.
MarkMLl
-
Tnx!
I think it's a problem of the IDE not the project itself.
Gonna do some testst soon..
-
I think it's a problem of the IDE not the project itself.
Yes, hence you need to get the version number into the record.
But for any problem like this, having a specimen project is important.
MarkMLl
-
Tnx!
-
Before I end this topic, here
something that I coded so far.
First played around with some pi pico examples on github, tnx for that code!
One purpose for my pico is controlling ws2812b's.
Wrote single-NZR code for ws2812b led's/ledstrips/ledbars:
https://www.youtube.com/watch?v=qh562aQIgRc
Did coding ( arduino 2560/mikroPascal) before my 5meter strip ws2812b strip:
( 5meter is awsome, by the way )
https://www.youtube.com/playlist?list=PLcCKmeWXkrzSm4-kT055wc9f1ITOjBx16
Gonna close this topic in a few days, may someone want to repley.
Marcel