Recent

Author Topic: Start project for Raspberry pi PICO  (Read 2145 times)

jb007

  • Full Member
  • ***
  • Posts: 145
Start project for Raspberry pi PICO
« 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






« Last Edit: July 03, 2022, 07:59:13 pm by jb007 »
to DIY or not to DIY

pascal111

  • Sr. Member
  • ****
  • Posts: 423
  • Un trabajo en equipo para programas serias.
Re: Start project for Raspberry pi PICO
« Reply #1 on: July 03, 2022, 08:46:21 pm »
"Raspberry", it seems nice electronic piece. One day I'll program one of it, I can't get one in my current state.
La chose par la chose est rappelé.

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: Start project for Raspberry pi PICO
« Reply #2 on: July 03, 2022, 09:37:13 pm »
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)
« Last Edit: July 03, 2022, 09:38:54 pm by af0815 »
regards
Andreas

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Start project for Raspberry pi PICO
« Reply #3 on: July 03, 2022, 09:47:10 pm »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #4 on: July 04, 2022, 01:55:58 pm »
Tnx for your replies.

to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #5 on: July 07, 2022, 05:30:18 pm »
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...




to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #6 on: July 13, 2022, 12:20:54 pm »
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
« Last Edit: July 13, 2022, 10:19:50 pm by jb007 »
to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #7 on: July 13, 2022, 10:27:46 pm »

The happynes wasn't for long...
to DIY or not to DIY

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Start project for Raspberry pi PICO
« Reply #8 on: July 14, 2022, 08:48:47 am »
So what exactly did you do to get that?

Was this from the editor, compiler, debugger...

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #9 on: July 14, 2022, 04:53:09 pm »
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.

 

to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #10 on: July 14, 2022, 07:21:58 pm »
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!
to DIY or not to DIY

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Start project for Raspberry pi PICO
« Reply #11 on: July 14, 2022, 10:36:50 pm »
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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #12 on: July 14, 2022, 11:40:03 pm »
Tnx!


I think it's a problem of the IDE not the project itself.

Gonna do some testst soon..
to DIY or not to DIY

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Start project for Raspberry pi PICO
« Reply #13 on: July 15, 2022, 08:56:55 am »
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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Start project for Raspberry pi PICO
« Reply #14 on: July 18, 2022, 09:17:34 pm »
Tnx!
to DIY or not to DIY

 

TinyPortal © 2005-2018