Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:43
    UweBonnes commented #522
  • 15:42

    UweBonnes on master

    Target: Default to nop-function… (compare)

  • 15:42
    UweBonnes closed #524
  • 15:42
    UweBonnes closed #522
  • 15:35
    UweBonnes opened #524
  • Sep 22 19:30
    UweBonnes synchronize #507
  • Sep 22 18:40
    UweBonnes synchronize #507
  • Sep 22 15:28
    whitequark commented #523
  • Sep 22 11:41
    UberLambda commented #523
  • Sep 22 01:24
    UberLambda commented #523
  • Sep 22 00:35
    UberLambda commented #523
  • Sep 21 20:51
    UweBonnes commented #523
  • Sep 21 08:44
    UberLambda commented #523
  • Sep 21 08:40
    UberLambda commented #523
  • Sep 21 08:40
    UberLambda commented #523
  • Sep 21 08:36
    UberLambda commented #523
  • Sep 21 08:36
    UberLambda commented #523
  • Sep 21 08:33
    UberLambda commented #523
  • Sep 21 08:32
    UberLambda commented #523
  • Sep 21 08:31
    UberLambda commented #523
Yohann
@YohannFra_gitlab

Hello, i'm having a issue when trying to flash an elf file on an ARM Cortex-M4
using the Black Magic Probe and GDB. I think that the load command failed because of
the error i get after doing 'attach 1' but i don't understand why and how should
i fix it.
Here is how i do it :

➜  tuto_arm_dev gdb-multiarch --quiet ./test_program.elf
Reading symbols from ./test_program.elf...done.
(gdb) target extended-remote /dev/ttyACM0
Remote debugging using /dev/ttyACM0
(gdb) monitor tpwr enable
(gdb) monitor swdp_scan
Target voltage: 3.V
Available Targets:
No. Att Driver
 1      ARM Cortex-M
(gdb) attach 1
Attaching to program: /home/yohann/tuto_arm_dev/test_program.elf, Remote target
warning: while parsing target memory map (at line 1): Required element <memory> is missing
x00012476 in ?? ()
(gdb) load
Loading section .text, size x98 lma x0
Loading section .rodata, size x4 lma x98
Loading section .data, size x4 lma x9c
Start address x0, load size 160
Transfer rate: 31 KB/sec, 53 bytes/write.
(gdb) compare-sections
Section .text, range x0 -- x98: MIS-MATCHED!
Section .rodata, range x98 -- x9c: MIS-MATCHED!
Section .data, range x9c -- xa0: MIS-MATCHED!
warning: One or more sections of the target image do not match
the loaded file

Thanks for your help

UweBonnes
@UweBonnes
What MCU/SOC. The message "1 ARM Cortex-M" from the monitor swd command shows that your CPU is not recognized, so no flashing possible and no memory map.
Yohann
@YohannFra_gitlab
Actually i don't know what is the SOC it uses, i can't find anything about it even in the datasheet. It is WISOL module with an ARM Cortex M4F and 512kB Flash / 64kB RAM.
mubes
@mubes
Given that it's got sigfox embedded in it I doubt you'll get too much info.
Yohann
@YohannFra_gitlab
why so ?
Yohann
@YohannFra_gitlab
@UweBonnes I just found that the soc is an nRF52832
UweBonnes
@UweBonnes
@YohannFra_gitlab , what BMP bersion do you use? Git Head?
Yohann
@YohannFra_gitlab
The firmware is in 1.6.1 and it's the BMP V 2.1
UweBonnes
@UweBonnes
!.6.1 is ages old. Update to git HEAD, a lot has changed for NRF5x since 1.6.1.
Yohann
@YohannFra_gitlab
thanks i'm doing it now, i'll keep you up to date
Yohann
@YohannFra_gitlab
That was it thanks you !
mubes
@mubes
My pessimism was based on the fact sigfox isn't open...but it's good to see you got sorted!
Yohann
@YohannFra_gitlab
Hello, does anyone know if it's possible to flash a board connected with the Black Magic Probe using Jlink ?
There are some examples for my board who need Jlink to be flashed but i can make it,
it gives me this error:
➜ make flash
Flashing: /home/yohann/Desktop/Blackfoot/WSSFM20Rx_12x/development/sigfox_cfg2/source_wifi_example/_build_make/wifi_example.hex
ERROR: There is no debugger connected to the PC.
Makefile:268: recipe for target 'flash' failed
make: *** [flash] Error 41
UweBonnes
@UweBonnes
???
Jlink is some other debugger hardware.
Yohann
@YohannFra_gitlab
Yes it is but they also provide software to flash or debug, does it only works with their hardware or can it work with a BMP ?
Sid Price
@sidprice
The control protocols are very different between BMP and JLink, Segger tools cannot interface with the BMP. GDB is your friend!
Yohann
@YohannFra_gitlab
Thanks, i'll go back to gbd then
alxsfrm
@alxsfrm
Hi, need help.
BM connected to JTAG of STM32F765. mon swdp_scan returns:
  1. STM32F7xx
    on attach 1 i see
    Remote failure reply: EFF
    What is the problem ?
UweBonnes
@UweBonnes
Disconnect the BMP and try again.
alxsfrm
@alxsfrm
Didn't help
UweBonnes
@UweBonnes
Un- and repower the MCU.
alxsfrm
@alxsfrm
same
UweBonnes
@UweBonnes
EFF happens when the SWDJ state machine is out of sync.
Unpower both.
alxsfrm
@alxsfrm
Can this happen when there is some connectivity problem ?
UweBonnes
@UweBonnes
Good/multiple ground connections and short wires help also.
What adapter, I guess BMP native?
alxsfrm
@alxsfrm
yes, 2.1
UweBonnes
@UweBonnes
Custom CPU board? What supply? Any successfull connect before? Any other debugger available?
alxsfrm
@alxsfrm
Custom board. I have ST-link debugger. Also no success. only chip detection with st-info
UweBonnes
@UweBonnes
Any success with Stm32CubeProg?
Also try my pc-stlinkv2 branch.
alxsfrm
@alxsfrm
hasn't tried Cube. I'm working with Ac6
Will try pc-stlinkv2
UweBonnes
@UweBonnes
With an unmodified StlinkV2/3 with recent firmware you have many options. Stm32CubeProg, OpenOCD, pyocd, and stlink for programming and flashing and pystink (use my branch) for command line programming.
alxsfrm
@alxsfrm
i need only debugging.
What is the default OpenOCD port for St-link V2 ?
UweBonnes
@UweBonnes
3333 or 4444. Default port for PC-BMP is 2000.
UweBonnes
@UweBonnes
Connect under reset may also help
alxsfrm
@alxsfrm
Ok, thank you.
UweBonnes
@UweBonnes
Did anything help? Please more verbose!
alxsfrm
@alxsfrm
I don't have the hardware now, will try at Sunday.
mubes
@mubes
@alxsfrm pls post the relevant bit of the circuit diagram and board layout...that might be useful.
UweBonnes
@UweBonnes
@mubes : Did you have a chance to look at my PC-STLINKV2 branch?
mubes
@mubes
No, but I will. Still swearing at ft600s and ecp5 at the moment...
mubes
@mubes
@UweBonnes can you send me a link? Just tried to add it as a to-do but I don't see that branch in your GitHub? Sticky fingers on my part?
UweBonnes
@UweBonnes
PC-STLINKV2 is already in Git head. My cortexm_romtable branch fixes some rough edge, but mostly tries to get probe on more solid feets. I can already see the Cortex-M4 CPU in the STM32H745 (if it is runnning.
mubes
@mubes
Ok, I'll pull it when I get chance. The version in blackorb is ancient anyway!
Piotr Esden-Tempski
@esden
@/all we are moving the chat from Gitter to Discord. Join us on Discord chat for all the fun and information about ongoing projects as well as future support of the BlackMagicProbe hardware and software. The Discord invite link is: https://discord.gg/P7FYThy This channel here will be depricated from now on. If you are curious why we made that decision let me know. I am happy to tell you the whole story. It is also described in a pinned message on Discord in the general-chit-chat channel. :)