WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore for DUMMIES  (Read 1536 times)

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
piCore for DUMMIES
« on: September 13, 2024, 05:02:35 AM »
I start this new thread instead of "polluting whole TC-forum" :)

I have a Rasperry project with home-made wood chip/pellet -burner. I have built it for 2-3 years, and now it working with relay control. With relays it very difficult to implement complicated control functions and for that I already bought Rasperry Pi 3 board. I have previous linux experice with Debian and Guruplug -miniserver about 10 years ago, and I have embedded software coder background, but unfortunatelly about 25 years ago, so I'm too "aged newbie" on this subject.

TC is missing documentation (as every linux distro), and I think this may help other newbies to start using TC in embedded projects. I'm experinced development engineer, and I have no mental limits to produce countless flow of errors, so I hope comments to clean those errors from future versions of documentation.

Linux world is badly doconted, but everyone in this field is familiar with "HOW-TO" -documents. Typically those documents are unmaintained and useless, or even harmful for studying linux.

That's what is going to happend these documents, too, sooner or later. This is the main reason, why thsese documents will be more "WHY-TO" -style, to be useful even unmaintained.

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #1 on: September 13, 2024, 05:36:06 AM »
For start, let's make few simple QYSA questions: (QYSA=Questions You Should Ask).

Q Why not use Arduino/Pico whatever -simple programmable unitary chip/-board?
A Well, this is almost filosofical problem. I could use Arduino or Pico or whatever to make this project easier and faster. Actually, i have self-made fully functional 8031 -based development environment with EPROMMER, ASM/C compilers and sofisticated debugging system, and tons of already made software libraries with carefully build device drivers. Main advantage would be real-mode processor with linear non-virtual memory management and complete control of HW-interrupts and device driver code. Disadvantages are aging technology and missing software support for compilers ets. 8031 is still used today for cost limited applications, but to update and maintain whole tool chain is demanding. There is no commercial add-on board supply as Rasberry, and some native performance limits. These ARM-SOC:s has huge computing performance and numerous I/O-peripheral functions just by 10$ (for example Alwinner A20)).  Compilers, debuggers etc. are free and updated. With Rasperry and HAT-cards I can do almost everything with 100€, and that's nothing compared to develoment costs for proprietary HW even hobby projects. When system with Rasberry board and add-on cards and develoment system is done once, code and HW-desing resuse are easy and cheap. Times are chanced, and I have to update my embedded electronics develoment system, too.
« Last Edit: September 13, 2024, 05:53:46 AM by Yleisajattelija »

Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: piCore for DUMMIES
« Reply #2 on: September 14, 2024, 05:51:49 AM »
imho

less "for DUMMIES"
more for the  curious / inquisitive / intrigued
 8)


Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: piCore for DUMMIES
« Reply #3 on: September 14, 2024, 06:23:51 AM »
TC is missing documentation (as every linux distro), and I think this may help other newbies to start using TC in embedded projects. I'm experinced development engineer, and I have no mental limits to produce countless flow of errors, so I hope comments to clean those errors from future versions of documentation.

Linux world is badly doconted, but everyone in this field is familiar with "HOW-TO" -documents. Typically those documents are unmaintained and useless, or even harmful for studying linux.

That's what is going to happend these documents, too, sooner or later. This is the main reason, why thsese documents will be more "WHY-TO" -style, to be useful even unmaintained.

wrt
>documentation

i happened to read https://github.com/mbarbin/cmdlang
Quote
We are inspired by the [1]diataxis approach to technical documentation, which we use to structure our documentation.

which describes its self as
[1] A systematic approach to technical documentation authoring.

which on abit of a tangent reminds me of " Alex Wright - The Web That Wasn't: Forgotten Forebears of the Internet "   

Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: piCore for DUMMIES
« Reply #4 on: September 15, 2024, 02:39:30 AM »
more for the  curious / inquisitive / intrigued
or perhaps
those who know that they know nothing ( about piCore )

[1] https://en.wikipedia.org/wiki/I_know_that_I_know_nothing

as mentioned hear
It’s the bootLoader provided by raspberry pi.  All the documentation is on their site.   But it is closed source.

there is some stuff *you* cant know about  ???
aka
all i know that i know nothing about closed source

i guess with that in mind the original title might seam more appropriate :(


Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: piCore for DUMMIES
« Reply #6 on: September 16, 2024, 04:42:15 AM »
Before using piCore, healthy HW is needed.

"Clean" SOC costs 3€:

is this the opening chapter ?

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #7 on: September 16, 2024, 06:49:30 AM »
Before using piCore, healthy HW is needed.

"Clean" SOC costs 3€:

is this the opening chapter ?

I thought that this is The-Pro-Distro... :-)

For piCore bootloader Broadcom bootloading JTAG-spesification is needed (which it's very difficult to get) and making propietary bootloader for this kind of multiprocessor environmet it is (of course) very challenging job.

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #8 on: September 16, 2024, 08:09:41 AM »
QYSA: What in earth newbie need this topic for microchip internals and bootloader, especially if you cannot accsess whole thing? 
A: To use piCore you need a hardware, and it have to be Rasperry in this case. As discussed, Rasperry seems to keep secret information for bootload process and transition from real mode to protected mode. This transition is typically one-way door, and after that bootloader code executed nobody (exept preloaded system code) has direct access to physical memories and I/O -hardware registers. That means lot of problems when you need to write new device drivers or have to fix problems with old ones. One spesific problem is memory setup, after transition to protected mode MMU is initialized and memories mapped to virtual space. If physical memories are changed, this mapping (typically) must be done again, and unfortunatelly for security reasons it must be typically made before transition to protected mode. But this memory mapping may be secret and anyway must be done by Rasberry, in this case. There is some ways to avoid this problems, typically special memory-map files on bootload process, but it difficult and very complex. This may be serious problem for other linux distros port to Rasberry, and may even prohibit it.
« Last Edit: September 16, 2024, 08:15:19 AM by Yleisajattelija »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: piCore for DUMMIES
« Reply #9 on: September 16, 2024, 09:24:02 AM »
Hi Yleisajattelija
Before using piCore, healthy HW is needed.

"Clean" SOC costs 3€:

https://www.ebay.com/itm/272614818888
I just wanted to point out something I noticed in that sellers ad.

Instead of using a piece of anti-static foam to display their product, they
chose to use what appears to be carpeting. Possibly composed of a man
made fiber such as polyester, acrylic, nylon, etc:



Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: piCore for DUMMIES
« Reply #10 on: September 17, 2024, 06:24:08 PM »
its "nice" the newer pi have alternative options for booting sans SD card  (older ver's (can be configured to) just require flash to boot the hw)

wrt flash memory ... https://forum.tinycorelinux.net/index.php/topic,26482.msg170797.html#msg170797

 this echo's in the hollow betwixt my ears
"you're not really storing your data you're storing a probabilistic approximation of your data" - Exploitation of an SD Memory Card
 :'(

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #11 on: September 18, 2024, 01:35:50 AM »
Replacing SoC rosolve some problems, if Broadcomm will deliver JTAG -first/second stage bootloader spesificcation. There is ofcourse some security bits, which may be se or not, depending of few issues,....

There is some limux ports for other HW:

https://www.olimex.com/

https://www.myirtech.com/

Olimex use Alwinner chips, and Alwinner publish some data for JTAG (page 229):

https://www.olimex.com/Products/SOM/A20/_resources/A20-User-Manual-2013-03-22.pdf

 

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #12 on: September 18, 2024, 01:47:58 AM »
In this case, I need some add-on boards for Rasberry I/O bus. There is many add-on boards on ebay for Rasberry, but what is important is piCore compatible drivers. Nowdays linus uses devicetree blob:

https://www.kernel.org/doc/html/latest/devicetree/usage-model.html

....which was developed in linux PowerPC port:

https://docs.kernel.org/arch/powerpc/bootwrapper.html

That device tree mechanism works well is PowerPC environment, but as Linus has said "armel is awful mess"...

...but this thread is for newbies, so some questions must be askeed first... 

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #13 on: September 18, 2024, 02:57:20 AM »
QYSA: Why they discuss ARM problems in kernel device-tree-documentation and why this in important for newbie?
A: Well, ARM is not a problem but ARM SoC:s are. There is several reasons for that mess and result is that your Rasperry Pi add-on-board drivers are probably not working with piCore.

QYSA: What boards and drivers are working with piCore?
A: Let's hope piCore development group can tell that to us... 

Offline Yleisajattelija

  • Full Member
  • ***
  • Posts: 192
Re: piCore for DUMMIES
« Reply #14 on: September 18, 2024, 05:13:11 AM »
For example this:

https://www.waveshare.com/wiki/High-Precision_AD/DA_Board

For Rasberry Pi OS that driver probably works.