Search found 125 matches
- Tue Jul 28, 2020 9:35 am
- Forum: Bare metal, Assembly language
- Topic: Setting up exceptions made easy (??)
- Replies: 5
- Views: 584
Re: Setting up exceptions made easy (??)
You can only do that if you use the settings in config.sys to run non standard defaults. Ah, I see. That explains it. Also, why are the instructions of the form ldr pc,reset_handler rather than b reset_handler I'm guessing that it's because the latter jumps relatively, whilst the former jumps absol...
- Tue Jul 28, 2020 8:39 am
- Forum: Bare metal, Assembly language
- Topic: Setting up exceptions made easy (??)
- Replies: 5
- Views: 584
Re: Setting up exceptions made easy (??)
Seeings as we know where the interrupt table is, why don't we just set the relevant location? E.g. void my_swi_routine() { .... } void kernel_main() { *0x8 = my_swi_routine; ... } I figure I must be missing something. Aha. I see what I'm missing. The point is that the interrupt table is not a vecto...
- Tue Jul 28, 2020 7:22 am
- Forum: Bare metal, Assembly language
- Topic: Setting up exceptions made easy (??)
- Replies: 5
- Views: 584
Re: Setting up exceptions made easy (??)
Well, I managed to get something working. I'm not sure I entirely understand how it gets set up, but and actual IRQ handler function itself doesn't seem that difficult: save the registers, do your stuff, clear the handling flag, restore the registers. One thing I did notice is that a common way of s...
- Mon Jul 27, 2020 6:30 am
- Forum: Bare metal, Assembly language
- Topic: Setting up exceptions made easy (??)
- Replies: 5
- Views: 584
Setting up exceptions made easy (??)
I've been trying to follow through the setting of interrupts. It seems quite complicated from the examples I've seen. Seeings as we know where the interrupt table is, why don't we just set the relevant location? E.g. void my_swi_routine() { .... } void kernel_main() { *0x8 = my_swi_routine; ... } I ...
- Fri Jul 24, 2020 9:50 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: Serial communication voltages
- Replies: 9
- Views: 735
Re: Serial communication voltages
Many thanks.FTrevorGowen wrote: ↑Fri Jul 24, 2020 4:19 pm@blippy, for future reference you may find these notes/tests about/of a number of USB-to-Serial TTL devices of interest:
https://www.cpmspectrepi.uk/raspberry_p ... pters.html
Trev.
- Fri Jul 24, 2020 9:47 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: Serial communication voltages
- Replies: 9
- Views: 735
Re: Serial communication voltages
Just adjust the resistor values to drop it to 3V3 or slightly less. Plenty of on-line calculators available. 10K over 30K would probably do the job. That's got to be a lot easier than using an ESP as some sort of proxy. My electronics knowledge is naff, but I can figure out voltage dividers. If I s...
- Fri Jul 24, 2020 1:42 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: Serial communication voltages
- Replies: 9
- Views: 735
Re: Serial communication voltages
You could just measure it with a multimeter as it should be idle high Aha, that's useful. That voltage came out at 4.05V, which I assume is still too high. Sigh, well that was a waste of a couple of quid from China! Fortunately, I've got a Plan B. I have an ESP32, which operates on 3V3. So with a l...
- Fri Jul 24, 2020 11:33 am
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: Serial communication voltages
- Replies: 9
- Views: 735
Serial communication voltages
I recently got an USB to TTL232 module. I suddenly realised that I have no clue about voltages. I'd like to connect the device's RX and TX pins to the appropriate GPIO pins on the Pi. I have no idea if that will fry the GPIO pins, though. What's the answer? The chip is a CH340C. I'm assuming that VC...
- Thu Jul 23, 2020 5:19 am
- Forum: Other projects
- Topic: Let’s build an oscilloscope with raspberrypi and stm32
- Replies: 3
- Views: 528
Re: Let’s build an oscilloscope with raspberrypi and stm32
I'm still very much a beginner when it comes to MCUs. I have so much to learn. The STM32s and ESP32s are astonishingly cheap and powerful compared to Arduino range. I can see why Unos and Nanos are so popular, though. They're vastly more accessible. I had toyed with the idea of using an ATTiny85 chi...
- Wed Jul 22, 2020 9:05 pm
- Forum: Other projects
- Topic: Let’s build an oscilloscope with raspberrypi and stm32
- Replies: 3
- Views: 528
Let’s build an oscilloscope with raspberrypi and stm32
I did a little write-up on building an "oscilloscope" with raspberry pi and an stm32. It's a bit too big to post here, but here's a lnk: https://mcturra2000.wordpress.com/2020/ ... and-stm32/.
- Tue Jul 14, 2020 2:13 pm
- Forum: Bare metal, Assembly language
- Topic: Is DMA memory "atomic"?
- Replies: 5
- Views: 691
Re: Is DMA memory "atomic"?
Ah, thank you!LdB wrote: ↑Tue Jul 14, 2020 12:26 pmGenerally you don't read anything in the destination until the DMA transfer complete is signaled.
If you just launch a DMA transfer and then go read the destination memory immediately unless the transfer is really small you are pretty much guaranteed to read junk.
- Tue Jul 14, 2020 7:57 am
- Forum: Bare metal, Assembly language
- Topic: Is DMA memory "atomic"?
- Replies: 5
- Views: 691
Is DMA memory "atomic"?
This question isn't Pi specific, it's more of a general question about DMA. I'm a noob to the concept of DMA, so bear with me. It's difficult to know where to ask such a question, though. Suppose an MCU implements an ADC, for example. My understanding is that it takes several clock cycles for the MC...
- Fri Feb 28, 2020 7:52 pm
- Forum: Bare metal, Assembly language
- Topic: CircleOS + BASIC
- Replies: 6
- Views: 1138
Re: CircleOS + BASIC
Interesting links. Thanks for that.
- Fri Feb 28, 2020 2:58 pm
- Forum: Bare metal, Assembly language
- Topic: CircleOS + BASIC
- Replies: 6
- Views: 1138
Re: CircleOS + BASIC
The version of BASIC I've adopted is very very ... basic! It was originally written in 1976, way before Basic.Net. TinyBasic now supports loading and saving files! I've test it under QEMU using a premade image. There are utilities in the project for doing this, but I need to document them. PS I did ...
- Thu Feb 27, 2020 5:05 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
Thanks for the link.macload1 wrote: ↑Thu Feb 27, 2020 2:41 pmthe FreeRTOS port located here: https://github.com/macload1/RPiFreeRTOSuGFX
- Wed Feb 26, 2020 7:31 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
@blippy Thanks. I heard of rump kernels for the first time now. I did some quick reading. The concept is interesting, but I'm not sure, if there is still much activity in this project? I did read somewhere that the guy abandoned it to brew beer. I'm sure there's more to it than that, though. I'll b...
- Wed Feb 26, 2020 5:11 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
This sample works with USB mass-storage devices (e.g. flash drives) only. For SD card access have a look on addon/SDCard or addon/fatfs. Both have a sample subdirectory. Thanks. I checked out your suggestion, and it works! Circle is impressive. I'm glad I didn't have to write all this stuff myself....
- Wed Feb 26, 2020 3:07 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
@rst. I'm trying out sample/15-files on real hardware. It reports
I'm just trying to access the first partition (i.e. VFAT) on the SD card.
I also tried PARTITION umsd1-0, but that didn't work either.
Code: Select all
Partition not found: usmd1-1

I'm just trying to access the first partition (i.e. VFAT) on the SD card.
I also tried PARTITION umsd1-0, but that didn't work either.
- Tue Feb 25, 2020 6:28 pm
- Forum: Bare metal, Assembly language
- Topic: CircleOS + BASIC
- Replies: 6
- Views: 1138
Re: CircleOS + BASIC
This is just so cool :-) BASIC was the first language I've learned. Thanks! Most of the kudos goes to https://www.raspberrypi.org/forums/memberlist.php?mode=viewprofile&u=66812 who has basically done all of the heavy lifting by putting an OS in place that can be built upon. I had in mind a kind...
- Tue Feb 25, 2020 5:43 pm
- Forum: Bare metal, Assembly language
- Topic: CircleOS + BASIC
- Replies: 6
- Views: 1138
CircleOS + BASIC
I implemented a very rough-and-ready version of BASIC for rst's excellent Circle OS. I did this via a fork, as I haven't yet figured out how to create a build environment that's separate from rst's work. The git repo is available at https://github.com/blippy/circle . Go to subdirectory sample/40-tin...
- Mon Feb 24, 2020 12:40 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
You should be able to use a cross toolchain from here on your Ubuntu. Thanks for that. I went ahead with your suggestion, and it works fine. I'm glad I followed it, because I get better build times that way. Plus it's a more convenient solution, too. I've managed to get my UK keyboard working, too,...
- Sun Feb 23, 2020 9:54 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
Thanks for being interested in Circle! You're welcome. I've got a cool idea for a project. I managed to get your version of qemu working on Ubuntu 18.10. 18.10 is out of support now, so I can't install the cross-platform compiler. But I can compile circle on my Pi3. So I compile it on Pi3 and run i...
- Sun Feb 23, 2020 8:22 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
Building the custom version of qemu is difficult. There are some warnings that cause the build to bail out. So I did ../configure --disable-werror --target-list=arm-softmmu Now I'm getting: LINK arm-softmmu/qemu-system-arm /usr/bin/ld: cpus.o: in function `icount_warp_rt': /home/pi/Documents/qemu/cp...
- Sun Feb 23, 2020 4:08 pm
- Forum: Bare metal, Assembly language
- Topic: Circle - C++ bare metal environment (with USB)
- Replies: 325
- Views: 101995
Re: Circle - C++ bare metal environment (with USB)
QEMU? I compiled compiled the 03-screentext example from Circle. My Rules.mk reads as follows: AARCH ?= 32 RASPPI ?= 2 PREFIX ?= arm-none-eabi- PREFIX64 ?= aarch64-none-elf- I build the project, transfer it to a SD card, boot, and it works! Now I'm trying to get it to work via qemu. I did fallocate ...
- Sun Nov 17, 2019 12:04 pm
- Forum: Bare metal, Assembly language
- Topic: "Pi On Fire" demo won 2nd prize at Demosplash 2019
- Replies: 8
- Views: 1424
Re: "Pi On Fire" demo won 2nd prize at Demosplash 2019
One word for you: AWESOME