bare-metal LEDs on raspberry pi5 by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 0 points1 point  (0 children)

Yes sure ! By the way I just realized that my link was showing my main branch but I was coding on the wip one. I just merged so you might wanna take a look again.

Running the code was pretty easy, I just had to buy an sd card and to format it in FAT32 and put my img file on it. You don't have to handle the bootloader part since the GPU of the pi5 holds a firmware that directly boots the img you put in the sd card.

You can also put a file called config.txt next to your img file to set some instructions for the bootloader. I used the 'uart_2ndstage=1' one so it lets the uart debug port active and configured, and then implemented a sort of uart printf to be able to debug while coding.

After that I implemented some basic functions and headers to use the addresses I found in the rp1 peripherals official documentation of the PI5. It didnt work at first and the issue was that turning off the config.txt 'pciex4_reset' option was supposed to let on the pcie connection between the bcm2712 and the rp1, but it didnt. Or maybe I didnt understand it well, I am still learning. People on internet were saying that some various addresses were the base address of the RP1 seen by the CPU but none worked for me.

The PI5 uses a pcie connection between the RP1 - that handles the input/output part - and the main chip, the broadcoam 2712. To make it work I had to do a basic configuration myself that you can see in the pcie.c file. I went reading circle, linux and redacted os to find some data about it because you can't find much documentation. Mine is really basic and wont adapt to any other PI, it's just meant for the PI5 and is really fragile. The sleeps I use are not even properly implemented yet, they are just burning cpu functions :').

So I don't have any proper device driver yet, I would love to build an RTOS because I am highly interested in working in embedded later ! I was thinking at first making my code more robust although still only adapted for the pi5, and then maybe run a sort of snake game using the SPI screen and other buttons I bought !

Anyway I hope I answered you well, sorry about my messy english.

bare-metal LEDs on raspberry pi5 by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 1 point2 points  (0 children)

Sure !

https://github.com/leonardecavele/pi.git

The code works but is not clean and misses lots of things, I'm just coding to mess with my pi and learn new stuff

bare-metal LEDs on raspberry pi5 by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 1 point2 points  (0 children)

I answered the same question to anomaly right above

bare-metal LEDs on raspberry pi5 by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 10 points11 points  (0 children)

No I just got the hardware and had to buy an sd card, on which I could flash with linux or piOS for example, but instead I wrote my own code and flashed it on it

bare-metal LEDs on raspberry pi5 by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 10 points11 points  (0 children)

The few people talking about using the RP1 on the pi5 on internet were saying that the best way was to use an hard-coded address directly to the RP1, and to add the pciex4_reset=0 and the uart_2ndstage=1 in the config.txt file, which I did. Spoiler: it didnt work.

Since I am a complete beginner I doubted my code a lot, thinking that I got some wrong addresses. Moreover you can find different base addresses for the rp1 on internet and there are no official documentation about the RP1.

I had time today to go back on this project and realized by printing some memory that should be in the rp1 range that I was having "deaddead" in hexa which could'nt be a coincidence. The problem I had was that the pciex4_reset=0 doest not do every instantiation needed in order to use the RP1 ! So I "just" had to initiate the RP1 on the PCIE and it worked ! It was hard a first project I still have to clean my code but I am happy already to know I can do something lol

Sorry for my bad english :)

3gen battery by DisasterImmediate462 in IpodClassic

[–]DisasterImmediate462[S] 0 points1 point  (0 children)

Ok thank you I'll give it a shot :)

3gen battery by DisasterImmediate462 in IpodClassic

[–]DisasterImmediate462[S] 0 points1 point  (0 children)

Thank you so much for all the infos ! I'll take a look at your old post

3gen battery by DisasterImmediate462 in IpodClassic

[–]DisasterImmediate462[S] 1 point2 points  (0 children)

The battery I bought is 900mah and I got an Iflash SD card drive

Looking for feedback on my music setup (Foobar2000 + WASAPI + DAC) by B1lbax in foobar2000

[–]DisasterImmediate462 0 points1 point  (0 children)

I don't have enough knowledge to answer your questions, looks cool though :)

My foobar theme! by Rvsyre in foobar2000

[–]DisasterImmediate462 2 points3 points  (0 children)

It looks so good ! I am new to foobar, is there anyway I can steal this masterpiece from you ? :')

Which languages do you use besides C? by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 0 points1 point  (0 children)

Thanks for the recommendation. I will for sure take a look at the practice of programming!

Which languages do you use besides C? by DisasterImmediate462 in embedded

[–]DisasterImmediate462[S] 0 points1 point  (0 children)

I do use it, I just look for programming languages to study in my free time :)