Go to advanced search

by dwelch67
Fri Dec 06, 2019 7:46 pm
Forum: Bare metal, Assembly language
Topic: Delay Function in Assembly (ARM Assembly, .s file)
Replies: 1
Views: 105

Re: Delay Function in Assembly (ARM Assembly, .s file)

you need to use a timer. there is a system timer that runs at 250Mhz, so figure out how may timer ticks or roll overs you need consume the time ,then change the led state, repeat.
by dwelch67
Fri Dec 06, 2019 7:44 pm
Forum: Bare metal, Assembly language
Topic: [Solved] multicore confusion
Replies: 6
Views: 215

Re: multicore confusion

for that simple code the other cores are stuck in the same loop, you would want to do the same test but look for different results for each core and then isolate them into different loops or like the broadcom code, the same loop but do math on the core id (use the core id with the base address of a ...
by dwelch67
Mon Dec 02, 2019 7:35 pm
Forum: Bare metal, Assembly language
Topic: What can i really make in ARM Assembly
Replies: 18
Views: 1738

Re: What can i really make in ARM Assembly

Inline assembly syntax is not a C thing it is specific to the compiler/toolchain one might have asm("nop" ) another asm { "nop" } another perhaps I have seen asm : "nop" one allows asm ("nop; nop") which makes sense to very few of us, so others may require: asm("nop\nnop\n") instead because semicolo...
by dwelch67
Sun Dec 01, 2019 4:10 am
Forum: Bare metal, Assembly language
Topic: What can i really make in ARM Assembly
Replies: 18
Views: 1738

Re: What can i really make in ARM Assembly

Any assembly file you write should have a .S (not .s) extension. Use "gcc" to compile (assemble) it, not "as", and the .S will direct it to run the gcc preprocessor so you can use the same conditional compilation, defines, etc., that you use in C, and it will integrate with your C files (or any oth...
by dwelch67
Sun Dec 01, 2019 3:53 am
Forum: Bare metal, Assembly language
Topic: [SOLVED] Aarch64 - how many cores are kicked off in the first place ?
Replies: 5
Views: 1332

Re: [SOLVED] Aarch64 - how many cores are kicked off in the first place ?

Sounds like you got it but just in case. with on config.txt the gpu is going to load your kernelX.bin file at a known offset in arm's address space and place some code at the beginning of arm's address space, the code the processors boot into. they now have it so that the filename without a config.t...
by dwelch67
Sun Dec 01, 2019 3:33 am
Forum: Bare metal, Assembly language
Topic: Learning ARM Assembler
Replies: 7
Views: 469

Re: Learning ARM Assembler

The first several instruction sets I learned was by writing a disassembler. Not a full blown product and not one that dealt with variable length instructions very well but the exercise would be write some lines of asm using a known working tool, assemble, then disassemble the object or binary. repea...
by dwelch67
Tue Aug 13, 2019 8:25 pm
Forum: Bare metal, Assembly language
Topic: swp or ldrex/strex issue on RPI2
Replies: 8
Views: 2454

Re: swp or ldrex/strex issue on RPI2

ldrex/strex are not meant to be a swp replacement. They are for shared access to a resource in a multi-processor configuration. Not required to be implemented in uniprocessor implementation, but you are not talking about the arm11/pi1. The software side of arms documentation implied this but the har...
by dwelch67
Fri Jun 14, 2019 3:20 pm
Forum: Bare metal, Assembly language
Topic: Any Tutorial to Create a Cross Compiler for ARM? Rpi3
Replies: 7
Views: 1740

Re: Any Tutorial to Create a Cross Compiler for ARM? Rpi3

https://github.com/dwelch67/build_gcc I have scripts to build arm (aarch32) and aarch64 cross compilers on linux. I used to maintain them for windows as well but dont boot windows but once every few years. would use mingw32 back then, cygwin would have worked, but now windows has some bash thing don...
by dwelch67
Sat May 04, 2019 1:22 am
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 2688

Re: JTAG Recommendations

I didnt need to cut a trace, just soldered to the pin on the camera connector.
by dwelch67
Sat May 04, 2019 1:21 am
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 2688

Re: JTAG Recommendations

You only need to find TMS that way using the old old original (available to the masses) cards, from there on out they were on a pin in the P1 connector, no soldering required. You dont need trst, but if you do then it is not in a standard place with an ftdi mpsse chip, it is just a gpio so different...
by dwelch67
Tue Apr 23, 2019 9:23 pm
Forum: Bare metal, Assembly language
Topic: CPU Execution Speed
Replies: 10
Views: 1691

Re: CPU Execution Speed

look in my bench02 directory in the (old) raspberrypi repo (github.com/dwelch67/raspberrypi). port that forward as needed.

David (dwelch67)
by dwelch67
Tue Apr 23, 2019 9:21 pm
Forum: Bare metal, Assembly language
Topic: CPU Execution Speed
Replies: 10
Views: 1691

Re: CPU Execution Speed

.globl ARMTEST3 ARMTEST3: subs r0,r0,#1 nop nop nop nop nop nop nop nop subs r0,r0,#1 nop nop nop nop nop nop nop nop subs r0,r0,#1 nop nop nop nop nop nop nop nop subs r0,r0,#1 nop nop nop nop nop nop nop nop subs r0,r0,#1 nop nop nop nop nop nop nop nop subs r0,r0,#1 nop nop nop nop nop nop nop no...
by dwelch67
Tue Apr 23, 2019 9:17 pm
Forum: Bare metal, Assembly language
Topic: CPU Execution Speed
Replies: 10
Views: 1691

Re: CPU Execution Speed

you can find my experiments too from years ago. Your loop has the problem that at least three instructions in a row are waiting on the instructions just before to complete, so you lose a lot of the features of a pipeline like this, for example a loop with a bunch of the same instruction add r0,r0,#1...
by dwelch67
Thu Apr 04, 2019 9:35 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 2688

Re: JTAG Recommendations

for the original pis basically the pi-zero is what you can buy new today. jtag is simple. I recommend openocd 0.9.0 as 0.10.0 and later is problematic not just with arm11s but I think cortex-ms too. certainly with arm11's though. If you dont hook up reset you can use the legacy ft2232 mode as the ne...
by dwelch67
Thu Apr 04, 2019 9:30 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 2688

Re: JTAG Recommendations

I wouldnt say there are no recommendations, there was a lengthy discussion or two on jtag. The FT232H breakout from adafruit https://www.adafruit.com/product/2264 is more than adequate for the job. The problem is not the debugger but setting up openocd or whatever else, now maybe if you spend hundre...
by dwelch67
Tue Jan 29, 2019 6:09 pm
Forum: Bare metal, Assembly language
Topic: Spider-OS a new operating system
Replies: 113
Views: 19584

Re: Spider-OS a new operating system

Note that writing an operating system in assembly does not mean small nor fast. This are misunderstandings, doesnt meant you are learning the system any better than you would using mostly C plus a little ASM. That is also a misunderstanding. Doesnt mean you shouldnt try but if those are your goals a...
by dwelch67
Tue Dec 11, 2018 10:54 pm
Forum: Bare metal, Assembly language
Topic: Pi 3B+ Activity LED
Replies: 23
Views: 10121

Re: Pi 3B+ Activity LED

Nope but it has a pretty obvious bug ... not 27 .. try 9 .. no idea where the 27's come from ra=GET32(GPFSEL2); ra&=~(7<<27); ra|=1<<27; PUT32(GPFSEL2,ra); Each GPFSEL covers 10 GPIO as they are 3 bits .. 10x3 = 30 bits of the 32 bit register .. look at datasheet GPFSEL0 = GPIO0 .. 9 GPFSEL1 = GPIO...
by dwelch67
Wed Oct 17, 2018 2:03 pm
Forum: Bare metal, Assembly language
Topic: Schematics/address map
Replies: 3
Views: 1823

Re: Schematics/address map

We were very surprised to get any documentation of any kind from Broadcom, and not surprised that that for the most part ended as quickly as it started, I would not expect to find any more schematics or documentation than you have already found. I wouldnt expect any more schematics nor chip details ...
by dwelch67
Tue Oct 09, 2018 2:47 pm
Forum: Bare metal, Assembly language
Topic: Specs for RPi Zero W Wifi hardware?
Replies: 11
Views: 4100

Re: Specs for RPi Zero W Wifi hardware?

No different than working with an ESP8266. It has firmware that was downloaded to make the interface to an mcu or other really easy, there are various solutions making different (incompatible) interfaces to the ESP8266. Or with an ESP8266 you can write the firmware yourself that is downloaded and ru...
by dwelch67
Mon Oct 08, 2018 6:09 pm
Forum: Bare metal, Assembly language
Topic: Help With Simple Hello World Program in Bare Metal ASM
Replies: 4
Views: 2110

Re: Help With Simple Hello World Program in Bare Metal ASM

its a pi-zero so 0x20xxxxxx is correct yes?
by dwelch67
Wed Sep 26, 2018 10:17 pm
Forum: Bare metal, Assembly language
Topic: Building a network stack
Replies: 12
Views: 2277

Re: Building a network stack

lwip is a popular solution. As mentioned above it depends on whether you have a reason to write your own. And at what level. ARP and ping will be your first test to get your feet wet. With practice you can bang out a (special purpose) UDP stack (with cheats) in an afternoon. And when I say that I ha...
by dwelch67
Wed Sep 26, 2018 3:34 am
Forum: Bare metal, Assembly language
Topic: Support For Bare Metal Programming
Replies: 8
Views: 2963

Re: Support For Bare Metal Programming

I mentioned the microcontrollers as another path someday. zero support for it at this site, this is raspberry pi only. since you found this forum I would start here with a pi-zero or one of the arm11 based raspberry pi boards. then choose your next path. can stay here and move to armv7 mode of a pi3...
by dwelch67
Mon Sep 24, 2018 3:35 am
Forum: Bare metal, Assembly language
Topic: Support For Bare Metal Programming
Replies: 8
Views: 2963

Re: Support For Bare Metal Programming

You have found the right place. I highly highly recommend you start with a pi-zero, which is armv6 based, the armv7 and armv8 on the pi3 is a whole other level of pain. There are other armv6 based pis you can sometimes get the pi1 A+ for lack of a better term. You will need an sd card of course, don...
by dwelch67
Sun Sep 16, 2018 8:52 pm
Forum: Bare metal, Assembly language
Topic: Limit on the size of a bare metal program?
Replies: 5
Views: 1955

Re: Limit on the size of a bare metal program?

Yeah I dont use interrupts unless I have to, or unless I want to do a simple demonstration as they are a bigger trap than just booting a processor. One little mistake and pain. Uart interrupts are generally tricky, depends on the uart (talking general not necessarily pi) Usually you get an interrupt...
by dwelch67
Sun Sep 16, 2018 8:32 pm
Forum: Bare metal, Assembly language
Topic: Limit on the size of a bare metal program?
Replies: 5
Views: 1955

Re: Limit on the size of a bare metal program?

That was an arbitrary limit. I tend to use minimalish sizes on my examples so that I dont have to keep changing the linker script every time. Historically and probably still you could (can) adjust the split length to determine how much if the ram goes to the arm and how much to the GPU so even for a...

Go to advanced search