comp.lang.ada
 help / color / mirror / Atom feed
From: "Johan Söderlind Åström" <johaa1993@gmail.com>
Subject: Re: How to create a GPR project for ARM Cortex?
Date: Sun, 12 Nov 2017 06:29:57 -0800 (PST)
Date: 2017-11-12T06:29:57-08:00	[thread overview]
Message-ID: <985c7393-262a-487a-bcb5-0207b307197a@googlegroups.com> (raw)
In-Reply-To: <16ddffcb-6ee7-418e-a61a-fe8ef1c583c2@googlegroups.com>

Debugger is working to a moderate extent.

   package Ide is
      for Gnat use "arm-eabi-gnat";
      for Gnatlist use "arm-eabi-gnatls";
      for Debugger_Command use "arm-eabi-gdb";
      --for Connection_Config_File use "stm32l0.cfg";
      for Program_Host use "localhost:4242";
      for Communication_Protocol use "remote";
      --for Connection_Tool use "openocd";
      for Connection_Tool use "st-util";
   end Ide;


Using openocd: crashes randomly with "JTAG failure -4"

Using st-util: everything is working except I can not set breakpoints, I get following: "Could not execute "debug set line breakpoint'"

Flash to board button in GNAT Programming Studio does not work. It writes to the board but the program does not execute correct. I think the load address might be wrong. I get following:
gprbuild --target=arm-eabi -d -PC:\Users\Johan\Documents\B-L072Z-LRWAN1_Ada\default.gpr C:\Users\Johan\Documents\B-L072Z-LRWAN1_Ada\src\main.c -largs -Wl,-Map=map.txt
Compile
   [c]            main.c
   [asm]          startup_stm32l072xx.s
Link
   [archive]      libdefault.a
   [index]        libdefault.a
   [link]         main.c
Memory region         Used Size  Region Size  %age Used
             RAM:        1544 B        20 KB      7.54%
           FLASH:        1800 B       192 KB      0.92%
[2017-11-12 15:28:07] process terminated successfully, elapsed time: 00.68s
Retrieving the load address.
arm-eabi-objdump C:\Users\Johan\Documents\B-L072Z-LRWAN1_Ada\bin\main.elf -h
Load address is: 0x080000c0
Creating the binary (flashable) image.
arm-eabi-objcopy -O binary C:\Users\Johan\Documents\B-L072Z-LRWAN1_Ada\bin\main.elf C:\Users\Johan\Documents\B-L072Z-LRWAN1_Ada\bin\main.elf.bin
Flashing image to board.
Could not flash the executable.
[workflow stopped]

  parent reply	other threads:[~2017-11-12 14:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11 19:18 How to create a GPR project for ARM Cortex? Johan Söderlind Åström
2017-11-11 20:12 ` Simon Wright
2017-11-11 22:05   ` Johan Söderlind Åström
2017-11-12  8:06     ` Simon Wright
2017-11-12 10:18       ` Johan Söderlind Åström
2017-11-12 11:39         ` Simon Wright
2017-11-12  8:54   ` Simon Wright
2017-11-12 14:29 ` Johan Söderlind Åström [this message]
2017-11-13 10:54   ` Simon Wright
2017-11-13 19:08     ` Johan Söderlind Åström
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox