Go to advanced search

by dwelch67
Wed Sep 26, 2018 3:34 am
Forum: Bare metal, Assembly language
Topic: Support For Bare Metal Programming
Replies: 8
Views: 386

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: 386

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: 309

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: 309

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...
by dwelch67
Wed Aug 08, 2018 2:16 am
Forum: Bare metal, Assembly language
Topic: Clang question (unwanted memset and memcpy calls in Assembly)
Replies: 16
Views: 613

Re: Clang question (unwanted memset and memcpy calls in Assembly)

Can you please post some example code that causes the problem(s) with these tools. Note gcc 8.2.0 is out, curious to see this gcc 8.x.x issue (as well as the clang/llvm).

David
by dwelch67
Mon Aug 06, 2018 7:20 pm
Forum: Bare metal, Assembly language
Topic: Clang question (unwanted memset and memcpy calls in Assembly)
Replies: 16
Views: 613

Re: Clang question (unwanted memset and memcpy calls in Assembly)

note my llvm/clang preference was to build to bitcode/bytecode whatever they call it (--emit-llvm) unoptimized on the compiler then combine all the code into one file then run the optimizer on that one file then use llc to make the target specific asm or object file since it can do that now. no doub...
by dwelch67
Mon Aug 06, 2018 6:23 pm
Forum: Bare metal, Assembly language
Topic: Clang question (unwanted memset and memcpy calls in Assembly)
Replies: 16
Views: 613

Re: Clang question (unwanted memset and memcpy calls in Assembly)

been there, dealt with this, I think it is a longer obscure command line option, will see if I can find it, but yes it is annoying that they do that...I stopped using clang in the 3.x days because every release the command line options changed and it became unmanagable to provide examples or maintai...
by dwelch67
Fri Jul 27, 2018 2:14 pm
Forum: Bare metal, Assembly language
Topic: RPi 2 and OpenOCD
Replies: 24
Views: 10219

Re: RPi 2 and OpenOCD

which flavor of rpi2? there are two different ones with different processor cores, I dont expect the jtag access to be the same.
by dwelch67
Wed Jul 11, 2018 11:15 pm
Forum: Bare metal, Assembly language
Topic: Bare metal malloc
Replies: 9
Views: 686

Re: Bare metal malloc

Not knowing your application there are ways to statically "allocate" space for buffers that might have in an normal situation been allocated dynamically. so depending on what you are doing you might still be able to get rid of malloc. Yes, in theory the mmu is slower. When we say 1:1 we mean 0x10000...
by dwelch67
Sat Jul 07, 2018 8:16 pm
Forum: Bare metal, Assembly language
Topic: Bare metal malloc
Replies: 9
Views: 686

Re: Bare metal malloc

I would step back before going forward. Most importantly why do you need malloc in a baremetal program/environment? Should be able to remove that requirement. If not then why do you need the MMU? Data cache enable or other? Even though baremetal are you doing something multi-threaded, are you making...
by dwelch67
Sun Jul 01, 2018 7:48 pm
Forum: Bare metal, Assembly language
Topic: prevent crashes from unaligned memory accesses when porting code
Replies: 9
Views: 800

Re: prevent crashes from unaligned memory accesses when porting code

so I didnt see my solution as bad actually I stayed within the toolchain, target, compile domain, etc...then the host program wrapped around that a checksum modification for validation of the data before saving it for the flash tool. someone else called it pure evil. when he had the same problem he ...
by dwelch67
Sun Jul 01, 2018 7:46 pm
Forum: Bare metal, Assembly language
Topic: prevent crashes from unaligned memory accesses when porting code
Replies: 9
Views: 800

Re: prevent crashes from unaligned memory accesses when porting code

I assume your situation is worse than mine was. the person creating the pain was no longer with the company, and we were holding off a re-write. The structure had pointers to other structures. The desire was to have a mechanism for an alternate boot config without re-compiling the bootloader every t...
by dwelch67
Sun Jul 01, 2018 5:42 pm
Forum: Bare metal, Assembly language
Topic: prevent crashes from unaligned memory accesses when porting code
Replies: 9
Views: 800

Re: prevent crashes from unaligned memory accesses when porting code

You are using structures across compile domains. Which lands in the "implementation defined" area of the language, which means there is no reason to expect it to work, nor continue to work (unless you stay within that domain). If you were using structs properly you wouldnt need to pack them, unless ...
by dwelch67
Tue Jun 12, 2018 9:49 pm
Forum: Bare metal, Assembly language
Topic: Multi-core example fails on Pi3 B+, aarch32?
Replies: 12
Views: 765

Re: Multi-core example fails on Pi3 B+, aarch32?

I have raspberrypi-zero and raspberrypi-three repos to try to reboot the examples without the now years of old examples that are mixed in from the original to the public pi1 boards. Most of the work is on the arm11 so the pi-zero basically now, the pi3 work I only went so far they are significantly ...
by dwelch67
Tue Jun 12, 2018 2:18 pm
Forum: Bare metal, Assembly language
Topic: Multi-core example fails on Pi3 B+, aarch32?
Replies: 12
Views: 765

Re: Multi-core example fails on Pi3 B+, aarch32?

also that is likely a really old example...would it even work on a pi3 b+?
by dwelch67
Tue Jun 12, 2018 2:17 pm
Forum: Bare metal, Assembly language
Topic: Multi-core example fails on Pi3 B+, aarch32?
Replies: 12
Views: 765

Re: Multi-core example fails on Pi3 B+, aarch32?

seriously they changed the bootloader? it doesnt spin in a loop anymore? it puts the core to sleep? is there a thread/posting with the disassembly?

will have to re-visit this when I have time...

Thanks,
David
by dwelch67
Sat Jun 09, 2018 3:38 am
Forum: Bare metal, Assembly language
Topic: Bare metal on raspberry pi 3 B+ not booting - finally working
Replies: 5
Views: 972

Re: Bare metal on raspberry pi 3 B+ not booting - finally working

vectors.s .globl _start _start: mov sp,#0x08000000 bl notmain hang: b hang .globl PUT32 PUT32: str r1,[r0] bx lr .globl GET32 GET32: ldr r0,[r0] bx lr .globl dummy dummy: bx lr notmain.c extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); extern void dummy (...
by dwelch67
Sat Jun 09, 2018 3:14 am
Forum: Bare metal, Assembly language
Topic: Bare metal on raspberry pi 3 B+ not booting - finally working
Replies: 5
Views: 972

Re: Bare metal on raspberry pi 3 B+ not booting - finally working

If you had tried all combinations you would have found the ones that work.
by dwelch67
Fri Jun 01, 2018 7:27 pm
Forum: Bare metal, Assembly language
Topic: Bare metal on raspberry pi 3 B+ not booting - finally working
Replies: 5
Views: 972

Re: Bare metal on raspberry pi 3 B+ not booting - finally working

config.txt is not required to run bare metal on the pi, just need to have the right bootstrap and the right linker/entry address and possibly file name for the particular board. you should understand both how to override the defaults with config.txt but also use the defaults without.
by dwelch67
Tue May 15, 2018 8:17 pm
Forum: Bare metal, Assembly language
Topic: CortexM0+/M4 libraries on raspberry pi B+
Replies: 1
Views: 476

Re: CortexM0+/M4 libraries on raspberry pi B+

the binaries, no. the cortex-m part of it is one problem the bigger problem is that the processor itself is the least of your worries, the processor is just a means to get at the peripherals which will vary widely not only across arm based processors but even within the cortex-m0 world for example y...
by dwelch67
Fri May 11, 2018 7:12 pm
Forum: Bare metal, Assembly language
Topic: prevent crashes from unaligned memory accesses when porting code
Replies: 9
Views: 800

Re: prevent crashes from unaligned memory accesses when porting code

or fix the code such that it doesnt misuse structures like that.
by dwelch67
Sun Apr 22, 2018 11:57 pm
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2780

Re: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config

Why not use the ftdi board as a uart to access a bootloader? No reason to remove the sd card more than one more time. Only two wires to hook up rather than 5 or 6. No reason to do the sd card dance if you cant get jtag to work.
by dwelch67
Sun Apr 22, 2018 12:59 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2780

Re: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config

Are you not able to halt, load a program, and resume?

Go to advanced search