IDE with Eclipse with Jantje's plugin

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 12, 2017 10:15 am

Then everything is ok and it should work with the bootloader. But it does not work here :)
It seems to me the eabi-gdb gives a command to the jlink to flash from 8000000 even it should be from 8002000 for the bootloader variant.

PS: I've done following experiment in Sloeber:
1. I compile Blink with MMini Bootloader20 profile (compiles from 8002000) and flash it via Jflash. Bootloader stops working. The blink does not blink.
2. I flash the bootloader via Jflash from 8000000. The Bootloader lives and blink blinks.
So what went wrong here?
Pukao Hats Cleaning Services Ltd.

michael_l
Posts: 337
Joined: Mon Aug 24, 2015 6:11 pm

Re: IDE with Eclipse with Jantje's plugin

Post by michael_l » Wed Apr 12, 2017 10:53 am

In GBD when issuing a 'load abc.elf' command to flash image does it look from inside .elf file where to flash the file (e.g. 0x8002000 or 0x8005000) ?

EDIT: ELF shows start address for VMA (virtual memory address) and LMA (load memory address) 0x8002000

Code: Select all

c:.pioenvs\genericSTM32F103CB\firmware.elf
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08007b4d

Program Header:
0x70000001 off    0x00016288 vaddr 0x08016288 paddr 0x08016288 align 2**2
         filesz 0x00000008 memsz 0x00000008 flags r--
    LOAD off    0x00000000 vaddr 0x08000000 paddr 0x08000000 align 2**15
         filesz 0x00016284 memsz 0x00016288 flags rwx
    LOAD off    0x00016288 vaddr 0x08016288 paddr 0x08016288 align 2**15
         filesz 0x00000008 memsz 0x00000008 flags r--
    LOAD off    0x00018000 vaddr 0x20000000 paddr 0x08016290 align 2**15
         filesz 0x00000ce8 memsz 0x00000ce8 flags rw-
    LOAD off    0x0001ef78 vaddr 0x08016f78 paddr 0x08016f78 align 2**15
         filesz 0x00000ec4 memsz 0x00000ec4 flags r--
    LOAD off    0x00020ce8 vaddr 0x20000ce8 paddr 0x20000ce8 align 2**15
         filesz 0x00000000 memsz 0x000036e8 flags rw-
private flags = 5000002: [Version5 EABI] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00014284 08002000  08002000 00002000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .text.align   00000004  08016284  08016284  00016284  2**0
                  ALLOC, CODE
  2 .ARM.exidx    00000008  08016288  08016288  00016288  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         00000ce8  20000000  08016290  00018000  2**3
                  CONTENTS, ALLOC, LOAD, DATA
  4 .rodata       00000ec4  08016f78  08016f78  0001ef78  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .bss          000036e8  20000ce8  20000ce8  00020ce8  2**2
                  ALLOC
  6 .debug_aranges 00002178  00000000  00000000  0001fe40  2**3
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_info   0007657c  00000000  00000000  00021fb8  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 0000c7a5  00000000  00000000  00098534  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_line   00016687  00000000  00000000  000a4cd9  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_frame  0000637c  00000000  00000000  000bb360  2**2
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_str    00015bff  00000000  00000000  000c16dc  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_loc    0002a6c2  00000000  00000000  000d72db  2**0
                  CONTENTS, READONLY, DEBUGGING
 13 .ARM.attributes 00000029  00000000  00000000  0010199d  2**0
                  CONTENTS, READONLY
 14 .debug_ranges 00002d48  00000000  00000000  001019c6  2**0
                  CONTENTS, READONLY, DEBUGGING
 15 .comment      00000070  00000000  00000000  0010470e  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
08002000 l    d  .text  00000000 .text
08016284 l    d  .text.align    00000000 .text.align
Last edited by michael_l on Wed Apr 12, 2017 11:41 am, edited 4 times in total.

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 12, 2017 11:32 am

.elf shows to 8002000.
My next observation (Sloeber) with bootloader20 ld profile:
1. Now (debug profile) I can compile, upload and debug the blink in the debugger. I can step through the code and asm. With "Executable offset" 08002000 set in debug config. No other settings in ld scripts or elsewhere.
2. When I try to run off the debugger (Jlink disconnected), the bootloader lives, the blink led lits but not blinks, and Win tells me there is a problem with USB port (the MMini one).
3. When I plug the usb off the MMini, and power MM from outside, the bootloader lives and the blink starts and blinks ok.
4. When I plug the usb back into MMini after a few minutes, the bootloader lives and blink blinks. The automatic upload from Sloeber via USB works as well.
Last edited by Pito on Wed Apr 12, 2017 11:44 am, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1600
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 12, 2017 11:42 am

It could be the Debugger inserts the BreakPoints into the flash, thus the BPoints interfere with the code execution (especially around USB)..
Last edited by Pito on Wed Apr 12, 2017 11:56 am, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

ag123
Posts: 777
Joined: Thu Jul 21, 2016 4:24 pm

Re: IDE with Eclipse with Jantje's plugin

Post by ag123 » Wed Apr 12, 2017 11:43 am

looks like u've solved it :D
i do note that it seem necessary to power cycle the MMini after disconnecting debug
it'd seem reset isn't sufficient

i've a different issue though, at times my stlinkv2 simply won't connect, but on my end it seem like a hardware / connectivity issue

michael_l
Posts: 337
Joined: Mon Aug 24, 2015 6:11 pm

Re: IDE with Eclipse with Jantje's plugin

Post by michael_l » Wed Apr 12, 2017 1:13 pm

Personally I'll be using platformio with Eclipse or Ozone. After small modification it builds new image really efficiently. Since platformio works and builds images I don't see any benefit with Arduino plugin except for serial monitor that you can start from toolbar.

User avatar
Rick Kimball
Posts: 1043
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: IDE with Eclipse with Jantje's plugin

Post by Rick Kimball » Wed Apr 12, 2017 1:56 pm

You can install the a serial terminal feature as part of eclipse.

https://mcuoneclipse.com/2015/04/20/ser ... ipse-luna/
-rick

stevestrong
Posts: 1749
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: IDE with Eclipse with Jantje's plugin

Post by stevestrong » Wed Apr 12, 2017 2:29 pm

I tried to follow the steps, but, although installation seems to be successful, the USB serial Rx does not work somehow, no data is received...

User avatar
Rick Kimball
Posts: 1043
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: IDE with Eclipse with Jantje's plugin

Post by Rick Kimball » Wed Apr 12, 2017 2:33 pm

To be honest I use putty. :) .. I had seen that a while back but never tried it.

More info here: https://mcuoneclipse.com/2015/04/20/ser ... ipse-luna/

It appears to have an issue.
-rick

stevestrong
Posts: 1749
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: IDE with Eclipse with Jantje's plugin

Post by stevestrong » Wed Apr 12, 2017 2:45 pm

well, after several restarts it seems that Rx works. But how to send data?

Post Reply