Recent

Author Topic: Raspberry Pi Pico and Freepascal  (Read 11057 times)

funlw65

  • Full Member
  • ***
  • Posts: 135
    • Visual Pin Configurator for Nucleo 64pin boards
Re: Raspberry Pi Pico and Freepascal
« Reply #45 on: September 24, 2022, 10:23:54 pm »
I've seen some extremely worrying background behaviour, and I'd point out that it's installed with root access and that even on Debian all VSCode updates come directly from MS servers and run MS-supplied installation scripts with root permissions.
Portable version of VScode that does not update on it self can be used on Windows, and to avoid MS telemetry and scripts VScodium might be a solution. According to https://duckduckgo.com/?q=docker+usb+access&ia=web it seams that some kind of host USB access can be given to a container.

@avra, thank you for the VSCodium, cortex-debug extension is there too. Also, extensions for linker script and arm assembler. A gruvbox theme and I am good to go. Unfortunately, no astyle and Jal (for JAL language) extensions... For JAL, I might ask the developer...
Lazarus 2.2.0rc3 fpc 3.2.2, Linux, UNIX BSD
widgetset: gtk2, msegui, qt5,  bgrabitmap controls
Immediate mode GUI: raygui 3.0

Mongkey

  • Sr. Member
  • ****
  • Posts: 278
Re: Raspberry Pi Pico and Freepascal
« Reply #46 on: October 01, 2022, 09:16:35 am »
hello all,
has anyone try pi pico for reading sd card on pascal??

thank you.

MarkMLl

  • Hero Member
  • *****
  • Posts: 5564
Re: Raspberry Pi Pico and Freepascal
« Reply #47 on: October 01, 2022, 10:45:10 am »
hello all,
has anyone try pi pico for reading sd card on pascal??

thank you.

No. I'd remark though as general points  that I've used it (soldered to a "project board" with various stuff including an SD-Card socket) for FUZIX, which highlighted (a) you need to check the (SPI) pin allocation carefully and (b) remember that certain pins are usable as one or the other SPI interfaces, certain pins for UARTs and so on: poor choice of /which/ UART is to be used will have implications later if SPI functionality is added.

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

Mongkey

  • Sr. Member
  • ****
  • Posts: 278
Re: Raspberry Pi Pico and Freepascal
« Reply #48 on: October 01, 2022, 11:24:52 am »
hello all,
has anyone try pi pico for reading sd card on pascal??

thank you.

No. I'd remark though as general points  that I've used it (soldered to a "project board" with various stuff including an SD-Card socket) for FUZIX, which highlighted (a) you need to check the (SPI) pin allocation carefully and (b) remember that certain pins are usable as one or the other SPI interfaces, certain pins for UARTs and so on: poor choice of /which/ UART is to be used will have implications later if SPI functionality is added.

MarkMLl

i'm new on this field, i used to create something by sample, seems to be hard for me :)
SD card is very important for stand alone logging device i think.

MiR

  • Full Member
  • ***
  • Posts: 234
Re: Raspberry Pi Pico and Freepascal
« Reply #49 on: October 01, 2022, 11:36:14 am »
Found this page, has quite some documentation:

https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico

MarkMLl

  • Hero Member
  • *****
  • Posts: 5564
Re: Raspberry Pi Pico and Freepascal
« Reply #50 on: October 01, 2022, 11:48:18 am »
i'm new on this field, i used to create something by sample, seems to be hard for me :)
SD card is very important for stand alone logging device i think.

Storage is important for a logging device, but an SD-Card might not be a good choice- at least with a standard filesystem.

The issue is that if you're logging, every time you commit data you will be updating metadata (i.e. the directory and FATs in the case of a FAT-based filesystem) which are typically at the start of the storage device. Now my understanding is that an SD-Card /might/, depending on the vendor, go to some trouble to extend the longevity of the low blocks; however since there is no wear levelling they are likely to fail before the remainder of the device: and when that happens your data is lost.

I've got various thoughts on mitigation which I'd prefer not to discuss, but you might find something like https://hackaday.com/2019/01/24/cool-tools-a-little-filesystem-that-keeps-your-bits-on-lock useful.

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

Mongkey

  • Sr. Member
  • ****
  • Posts: 278
Re: Raspberry Pi Pico and Freepascal
« Reply #51 on: October 01, 2022, 12:57:04 pm »
i'm new on this field, i used to create something by sample, seems to be hard for me :)
SD card is very important for stand alone logging device i think.

Storage is important for a logging device, but an SD-Card might not be a good choice- at least with a standard filesystem.

The issue is that if you're logging, every time you commit data you will be updating metadata (i.e. the directory and FATs in the case of a FAT-based filesystem) which are typically at the start of the storage device. Now my understanding is that an SD-Card /might/, depending on the vendor, go to some trouble to extend the longevity of the low blocks; however since there is no wear levelling they are likely to fail before the remainder of the device: and when that happens your data is lost.

I've got various thoughts on mitigation which I'd prefer not to discuss, but you might find something like https://hackaday.com/2019/01/24/cool-tools-a-little-filesystem-that-keeps-your-bits-on-lock useful.

MarkMLl

Thankyou for your advice, is there any litlefs sample on pascal?

MarkMLl

  • Hero Member
  • *****
  • Posts: 5564
Re: Raspberry Pi Pico and Freepascal
« Reply #52 on: October 01, 2022, 02:14:11 pm »
Thankyou for your advice, is there any litlefs sample on pascal?

Doubt it, but assuming it's C importing it shouldn't be too difficult (but I suggest a different thread, since it's relevant to more than just Pico or ARM).

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

 

TinyPortal © 2005-2018