Go to advanced search

by pgix
Tue Feb 16, 2021 8:50 pm
Forum: Bare metal, Assembly language
Topic: Working C/C++ Pico Toolchain in WSL!
Replies: 6
Views: 1339

Re: Working C/C++ Pico Toolchain in WSL!

OK - I've found someone who did this much better than me. Fantastic guide at: https://paulbupejr.com/raspberry-pi-pic ... velopment/
by pgix
Tue Feb 16, 2021 1:53 pm
Forum: Bare metal, Assembly language
Topic: Programming Pico Flash In-System
Replies: 4
Views: 1908

Programming Pico Flash In-System

Hi, I'm just starting playing with the Pico and have a potential design (actually a DMX (RS485-ish!) controller) which would use a couple of Pico's for peripheral work, with a CPU sitting between them controlling other things. The CPU may even end up being a Pi4. I'm currently looking at in-system p...
by pgix
Wed Feb 10, 2021 6:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: First Serious Project - Electrical Design Help
Replies: 0
Views: 212

First Serious Project - Electrical Design Help

Hi All, I very much come from a hobby programming background (I'm not a hardware guy), but also do some amateur sound and lighting design for stage. I got excited about the Pico and would like to try and make a DMX / RDM control system - for my own learning and interest. I've designed a DMX schemati...
by pgix
Tue Feb 09, 2021 1:55 pm
Forum: Bare metal, Assembly language
Topic: Working C/C++ Pico Toolchain in WSL!
Replies: 6
Views: 1339

Re: Working C/C++ Pico Toolchain in WSL!

If this works on WSL, great..(note I could build the elf to uf2 and pioasm tools by themselves but would continue to have the build overall fail when building the example and state they needed to be built). Thanks, @dwelch67 and while I have your attention, thanks for the baremetal examples - I've ...
by pgix
Mon Feb 08, 2021 5:39 pm
Forum: Bare metal, Assembly language
Topic: Working C/C++ Pico Toolchain in WSL!
Replies: 6
Views: 1339

Re: Working C/C++ Pico Toolchain in WSL!

Oddly, no. The Pico did not show up in mnt, so I did the file transfer from Windows. Could be an issue with plug and play flash drives not auto mounting. TBH, doing a file transfer from the Windows end is what I'm after anyway, although I guess that it could be quite useful adding 'cp x.uf2 /mnt/d' ...
by pgix
Mon Feb 08, 2021 2:51 pm
Forum: Bare metal, Assembly language
Topic: Working C/C++ Pico Toolchain in WSL!
Replies: 6
Views: 1339

Working C/C++ Pico Toolchain in WSL!

Hi All, I've just obtained myself a Pico and am very interested to see what it can do. I had some issues setting up the Windows toolchain for C/C++ so have gone for the system I use for my hobby OS development - WSL. Setting up pi-pico on WSL: In windows, create a directory which will contain all yo...
by pgix
Thu Apr 14, 2016 3:35 pm
Forum: Advanced users
Topic: how to make a controller for retro pi using tackt switches?
Replies: 2
Views: 3520

Re: how to make a controller for retro pi using tackt switch

Hi, I can think of a couple of ways. Firstly, hook the buttons up to the GPIO's as per https://www.raspberrypi.org/blog/using-the-gpio/ . For more flexibility, you could use something like an Arduino Micro as a HID/Game controller (good for flexibility, less good if you're tight on space or don't wa...
by pgix
Wed Mar 23, 2016 11:07 am
Forum: Advanced users
Topic: PiFanTOP (pi3)
Replies: 6
Views: 1781

Re: PiFanTOP (pi3)

Hi,
Nickcn wrote: I guess i can always wire in the switch...I just didnt want anything external. it is always an option though.
Is control circuitry an option? You could always use a GPIO pin with a transistor to provide software on/off - even PWM for speed control.

Cheers,
Adam
by pgix
Fri Mar 18, 2016 5:34 pm
Forum: General discussion
Topic: NEW HDD FOR RPI's
Replies: 39
Views: 8935

Re: NEW HDD FOR RPI's

The minimum spec to power the Pi3 alone isn't 2.5A - that's the recommended spec if you are hanging loads of peripherals on it. OK, in which case the photo under "attach USB peripherals" here is somewhat optimistic. Also: The special WD PiDrive Power Cable is used to supply appropriate po...
by pgix
Fri Mar 18, 2016 3:31 pm
Forum: General discussion
Topic: NEW HDD FOR RPI's
Replies: 39
Views: 8935

Re: NEW HDD FOR RPI's

I just made a comment on the blog post, but it obviously hasn't been approved yet. Has anyone bought this? It looks like the full kit comes with a 5v 2.0a adapter but claims Pi3 compatibility. It appears the adapter is supposed to supply the drive and the Pi, but doesn't even meet the minimum spec t...
by pgix
Tue Aug 11, 2015 2:02 pm
Forum: Bare metal, Assembly language
Topic: C++ bare metal coding
Replies: 5
Views: 3517

Re: C++ bare metal coding

Hi, I have basic hobby kernels for IA32 and AMD64 which are written in C++ with assembler used where sensible / required. Take a look at the wiki page http://wiki.osdev.org/C%2B%2B , which has lots of information about supporting the C++ runtime features (and links to creating global constructors). ...
by pgix
Tue Mar 24, 2015 1:30 pm
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 3939

Re: Flushing UART Tx and Rx FIFO

Hi Bill, I'll probably do that eventually. I have three classes "DebugConsole", "DebugInput" and "DebugOutput". The kernel calls an early architecture initialisation routine that registers a "DebugOutput" class (in this case, Uart inherits from DebugOutput - i...
by pgix
Tue Mar 24, 2015 7:22 am
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 3939

Re: Flushing UART Tx and Rx FIFO

Hi! Yes - that makes sense. Any read of FR seems to do the job and rather than guessing the number of required reads, testing the busy flag should allow me to know exactly how long to wait. I'm thinking of implementing this as a separate flush() routine and calling from puts rather than putc, so tha...
by pgix
Mon Mar 23, 2015 6:28 pm
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 3939

Flushing UART Tx and Rx FIFO

Hi All, Having fixed my ELF relocation issue, I've now got my basic kernel running quite well on the RPi - it seems that the "architecture independent" heap manager I wrote on x86 seems to work quite nicely on ARM. I'm working on my UART debug interface now, and have got quite a lot of use...
by pgix
Thu Mar 12, 2015 5:38 pm
Forum: Bare metal, Assembly language
Topic: Issue with Porting to ARM
Replies: 5
Views: 1663

Re: Issue with Porting to ARM

This is a rather embarrassing schoolboy error which I was not going to admit to, but in case anyone else is as daft as me, this answer may help. Having solved the initial problem, I discovered that I was getting strange freezes depending on whether I called my C++ code from assembly using BL or BLX ...
by pgix
Thu Mar 12, 2015 2:05 pm
Forum: Bare metal, Assembly language
Topic: Issue with Porting to ARM
Replies: 5
Views: 1663

Re: Issue with Porting to ARM

Ah - that explains it! I thought I was loading an immediate.

I now just need to find why a call to _lightLED as the first line of kmain doesn't light the LED!

Thanks,
Adam

Edit: Time to get qemu, I think!
by pgix
Thu Mar 12, 2015 1:55 pm
Forum: Bare metal, Assembly language
Topic: Issue with Porting to ARM
Replies: 5
Views: 1663

Issue with Porting to ARM

Hi All, I have an IA32/AMD64 hobby OS which has got quite a long way and I'd like to port it to the Raspberry Pi for a more "serious" embedded project. I had a previous go a long time ago with the original model B but am revisiting it now. Anyway - I've taken my first steps using this page...
by pgix
Fri Jun 14, 2013 5:21 pm
Forum: Arch
Topic: [fixed] Update of New Installation Fails
Replies: 5
Views: 3890

Re: Update of New Installation Fails

Hi and thanks for the response. I'm sorry to answer my own question so soon, but here's the solution: I ran 'pacman -Syu --ignore filesystem' and the update worked fine. Then I ran 'pacman -Syu' again and the filesystem package successfully updated. Not sure exactly why still, but it's good to be up...
by pgix
Fri Jun 14, 2013 4:55 pm
Forum: Arch
Topic: [fixed] Update of New Installation Fails
Replies: 5
Views: 3890

[fixed] Update of New Installation Fails

Hi, I have just created a new Arch install from the NOOBS loader. After installation, I run pacman -Syu, which failed due to conflicts in the filesystem. I have had this before and have overcome the problem, but this time it is directories that already exist. Looks like the problem is with the 'file...
by pgix
Wed May 08, 2013 10:38 am
Forum: Advanced users
Topic: Important notice for rpi public servers
Replies: 8
Views: 2470

Re: Important notice for rpi public servers

Hi, If it's really a big worry, use a USB hard drive for the logs (or a large capacity [wear levelling?] pen drive/SSD)? Cheers, Adam EDIT: Sorry - I missed this: One of the best ways to prevent the SD card from wearing out too soon is to have the root partition (and a swapfile/partition if you need...
by pgix
Tue May 07, 2013 3:42 pm
Forum: Bare metal, Assembly language
Topic: Clearing the BSS - Infinite Loop?
Replies: 8
Views: 2624

Re: Clearing the BSS - Infinite Loop?

Hi, Thanks for the suggestion. I'll give it a go. You mentioning the "compiler generated code" also gave me the idea that I could clear the BSS at my C++ entry point (provided I haven't used any uninitialized global / static variables first) as I'm much more comfortable with C++ than with ...
by pgix
Tue May 07, 2013 12:55 am
Forum: Bare metal, Assembly language
Topic: Clearing the BSS - Infinite Loop?
Replies: 8
Views: 2624

Clearing the BSS - Infinite Loop?

Hi, This is another problem that has caused me headaches with starting out kernel programming for the RPi (I'm quite familiar with x86 bootloaders and kernels). The issue is this short piece of assembly code designed to clear out the BSS: _kEntry: // Setup the stack. mov sp, #0x8000 // Clear out bss...
by pgix
Tue May 07, 2013 12:46 am
Forum: Bare metal, Assembly language
Topic: Peripherals - UART + LED Not Playing Nicely
Replies: 1
Views: 1131

Peripherals - UART + LED Not Playing Nicely

Hi, I'm playing around with a custom kernel for the RPi and am currently just communicating via UART0 and the OK LED. I can flash the LED from C++ and I can also send messages via UART (using a USB converter plugged in to my PC), but doing one of these things seems to disable the other. What am I mi...
by pgix
Fri Dec 28, 2012 10:23 pm
Forum: Automation, sensing and robotics
Topic: Hornby Model Railway Control
Replies: 5
Views: 7334

Re: Hornby Model Railway Control

Thanks guys - as with all this stuff, I think I just need to take the plunge now. The current train is analogue, so I think that the plan of action is to play with PWM by building an analogue 12v PWM controller first, then if that is successful look at fitting the decoder and switching to DCC voltag...
by pgix
Wed Dec 26, 2012 11:01 pm
Forum: Automation, sensing and robotics
Topic: Hornby Model Railway Control
Replies: 5
Views: 7334

Hornby Model Railway Control

Hi, My son had a Hornby model railway for Christmas (...yes - I have let him have a bit of a go on it :) ). The current set is basically analogue and has a single engine, but the idea is that he can extend this in the future. I'm currently making a base board for him. In looking at board constructio...

Go to advanced search