Go to advanced search

by dwelch67
Wed Jul 11, 2018 11:15 pm
Forum: Bare metal, Assembly language
Topic: Bare metal malloc
Replies: 9
Views: 373

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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?
by dwelch67
Sun Apr 22, 2018 12:58 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

Reading back...I have no use for step so never tried (well it is been many many years). halt, load_image, resume, mdw, mww are basically all I need/use. With microcontrollers I use the flash commands if supported. To get as far as you have gotten the jtag is working just fine, new hardware shouldnt ...
by dwelch67
Sun Apr 22, 2018 12:44 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

St-link is a two wire SWD, a sort of jtag transport, or basically not JTAG. Dont see how this could possibly work, you dont have the right signals.
by dwelch67
Thu Apr 19, 2018 12:32 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

Yep, FT232H most recently. Have used FT2232h have used FT4232h, jlink, all work just fine.
by dwelch67
Thu Apr 12, 2018 6:59 pm
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

telnet is typically 4444, but it is in the file, just need to match what you selected and what you are trying to telnet to. telnet_port 4444 #gdb_port 0 #tcl_port 0 $ telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > server window sho...
by dwelch67
Thu Apr 12, 2018 3:11 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

You had left me no choice but to just shot gun it and toss out all kinds of things to try. I have no clue what your new problem is. if you exit openocd and re-run it does this change? if you telnet in and halt and dump memory or registers does it work? are you connecting with gdb and maybe it is tic...
by dwelch67
Wed Apr 11, 2018 9:41 pm
Forum: Bare metal, Assembly language
Topic: low cost or free assembler books / tutorials?
Replies: 10
Views: 915

Re: low cost or free assembler books / tutorials?

assembly language is defined by the assembler the program that reads it. GNU has a bad habit of mangling languages created by the chip vendors, but that is fair since the assembler defines the assembly language. GNU assembler most definitely is not compatible with ARMs assembly language from ARMs to...
by dwelch67
Wed Apr 11, 2018 4:24 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

Okay I am not sure where I have a pi1 B+ I know I have alt least one very likely two or more. I liked the A+ better and have more of those and easily found one. Pulled the sd card from my pi zero from the other day. my code from my raspberrypi-zero repo which I posted notmain.c a couple of comments ...
by dwelch67
Wed Apr 11, 2018 3:37 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

Hmm, I am used to FT2232 parts and FT4232 parts where all the ports are uarts by default without an eeprom. this part C0/C1 are not uarts by default...only D0/D1 dmesg -c [16991.857343] usb 1-3.4.1: new high-speed USB device number 10 using ehci-pci [16991.966096] usb 1-3.4.1: New USB device found, ...
by dwelch67
Wed Apr 11, 2018 3:24 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

Not the only one to get jtag working on the pi, pretty sure of that. Others may not have posted code or talked about it, certainly.
by dwelch67
Wed Apr 11, 2018 3:22 am
Forum: Bare metal, Assembly language
Topic: Use a FT232H-Chip to debug Pi 1 B+ via JTag + OpenOCD config
Replies: 32
Views: 2461

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

I used that code yes, and most recently this code: //------------------------------------------------------------------------- //------------------------------------------------------------------------- extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); ext...

Go to advanced search