Search found 42 matches

by devan
Sun Jun 11, 2017 7:31 am
Forum: General discussion
Topic: Partial / old code for a F4 Maple bootloader
Replies: 33
Views: 839

Re: Partial / old code for a F4 Maple bootloader

On the topic of mass-storage bootloaders, it would be neat to make one that supports the new UF2 format. UF2 essentially takes the concept behind hex files where you have records of address+data, only it delimits them by 512-byte sector boundaries instead of line breaks so that each record is guaran...
by devan
Thu Jun 08, 2017 11:53 pm
Forum: STLink
Topic: ST-link clone by baite
Replies: 57
Views: 4651

Re: ST-link clone by baite

It could be that RST is SWIM_RST, in which case its not a problem because UART can be on PB6 and PB7, but if RST means T_NRST that appears to be on another pin In my experience, all of the metal dongles have the SWIM_RST pin exposed, not T_NRST (there are notes floating around from people complaini...
by devan
Thu Jun 08, 2017 10:45 pm
Forum: STLink
Topic: ST-link clone by baite
Replies: 57
Views: 4651

Re: ST-link clone by baite

I have been looking at whether the BMP could be made to work on one of those STLink dongles in a rectangular metal tube, and I think it may be possible, but the BMP code would need a lot of modification as the UART Tx and Rx would need to be on different UART devices. So I think the core part of ST...
by devan
Mon Feb 27, 2017 12:33 am
Forum: General discussion
Topic: Direct writing ISR address to vector table at run time?
Replies: 3
Views: 218

Re: Direct writing ISR address to vector table at run time?

Assuming you're running from flash, you won't be able to overwrite the vector table directly without erasing and rewriting the entire first page of flash, which is probably not what you want. A common approach to modify the vector table at runtime is to: Make a new vector table somewhere in RAM, usu...
by devan
Fri Feb 17, 2017 1:51 am
Forum: General discussion
Topic: Reverse engineering the ST-Link
Replies: 7
Views: 736

Re: Reverse engineering the ST-Link

A follow-up article from lujji porting the BMP to use the STLink bootloader: https://lujji.github.io/blog/installing-blackmagic-via-stlink-bootloader/ The highlights: He ported it for both the STLink/v2 and the STLink/v2-1. He patched the updater jar to make it think that the F103C8 has 128KiB flash...
by devan
Mon Feb 13, 2017 3:36 am
Forum: General discussion
Topic: ARM binary disassembler ??
Replies: 31
Views: 1405

Re: ARM binary disassembler ??

So if the start address in the vector table is 0x80007729 Does this mean its really 0x80007728 ? Yes, exactly. What does the VM setting do in the Retargettable decompiler ? The VM setting is used to tell the decompiler where the bin file would be loaded at runtime (probably in flash, so at 0x080000...
by devan
Mon Feb 13, 2017 12:54 am
Forum: General discussion
Topic: ARM binary disassembler ??
Replies: 31
Views: 1405

Re: ARM binary disassembler ??

From section 2.3.4 : The vector table contains the reset value of the stack pointer, and the start addresses, also called exception vectors, for all exception handlers. Figure 2.2 shows the order of the exception vectors in the vector table. The least-significant bit of each vector must be 1, indica...
by devan
Tue Jan 03, 2017 6:45 am
Forum: General discussion
Topic: Reverse engineering the ST-Link
Replies: 7
Views: 736

Re: Reverse engineering the ST-Link

I did some more analysis on the STLink/v2 bootloader. There doesn't seem to be any way to configure it to skip the DFU mode and jump straight to the application. Specifically, I didn't see anything in the execution trace that looked like it was accessing any interesting registers or areas of flash o...
by devan
Wed Dec 14, 2016 4:35 am
Forum: General discussion
Topic: Reverse engineering the ST-Link
Replies: 7
Views: 736

Re: Reverse engineering the ST-Link

Followup on some of my previous comments about the same article: http://stm32duino.com/viewtopic.php?p=20925#p20925 Using the information from Lujji's article and this other article [in Chinese], I was able to figure out what's needed to make an application compatible with the STLink/v2-1 bootloader...
by devan
Wed Dec 07, 2016 6:27 am
Forum: Black Magic Probe & other
Topic: Black Magic Probe on an stm32f103c8
Replies: 268
Views: 30866

Re: Black Magic Probe on an stm32f103c8

That's my understanding based on what I've seen and what the article said, but I don't know much about the STLink protocols, since I normally just immediately replace them with open-source debugger firmware. For some reason ST-Link 2-1 refused to enter DFU mode after I flashed it and just kept booti...