Hardware/ARMEBS/4/Troubleshooting

From UIT
(Difference between revisions)
Jump to: navigation, search
(Problem occured : 'Launching XXX')
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{TOC right}}
 
{{TOC right}}
 
== ARMEBS4 Troubleshooting and common problems ==
 
== ARMEBS4 Troubleshooting and common problems ==
 +
'''Tip''' : google for "ARMEBS4 your problem" can land you to this page ;)
  
 +
== No serial output (no <code>printf</code>) ==
 +
* Make sure you '''don't''' call <code>bsp_init</code> in your code, since <code>bsp_init</code> is already done.
  
 
== Connection problems ==
 
== Connection problems ==
Line 38: Line 41:
 
* A debug session is probably running. It must be stopped (Terminate) before starting another one
 
* A debug session is probably running. It must be stopped (Terminate) before starting another one
  
=== Problem occured : 'Start GDB Server Job' ===
+
=== Problem occurred : 'Start GDB Server Job' ===
 
eclipse error window
 
eclipse error window
 
<pre>
 
<pre>
Line 48: Line 51:
 
* Verify in the "Debug configuration..", "Debugger tab" that all eclipse variable used are valid. This is typically a ${wockspace_loc:/} depending on a closed project.
 
* Verify in the "Debug configuration..", "Debugger tab" that all eclipse variable used are valid. This is typically a ${wockspace_loc:/} depending on a closed project.
  
=== Problem occured : 'Launching XXX' ===
+
== Configuration problems ==
 +
 
 +
=== Problem occurred : 'Launching XXX' ===
 
eclipse error window
 
eclipse error window
 
<pre>
 
<pre>
Line 59: Line 64:
 
'''''Solution:'''''
 
'''''Solution:'''''
 
* openocd not found, set the openocd_path variable to the openocd path
 
* openocd not found, set the openocd_path variable to the openocd path
 +
* on Linux, OPENOCD_PATH should be set to /usr
  
 
===  CreateProcess: No such file or directory ===
 
===  CreateProcess: No such file or directory ===
Line 66: Line 72:
 
</pre>
 
</pre>
 
'''''Solution:'''''
 
'''''Solution:'''''
* Windows can't handle command lines longer than 32767, try to reduce the command line size.
+
* Windows seems to have problems with very long command lines (> 32767 characters, see [http://stackoverflow.com/questions/2916865/how-to-get-around-the-command-line-length-limit here]). Workaround : try to reduce the command line size (don't compile/link) unnecessary files, or move the project to a shorter path.
 +
 
 +
===  libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: error: expected expression before '{' token ===
 +
eclipse build console
 +
<pre>
 +
libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: error: expected expression before '{' token
 +
#define _GPIO_DEF(__CTRL__, __PIN__, __MODE__) {.ctrl = __CTRL__, .nr = __PIN__, .mask = (1<<__PIN__), .mode = (enum gpio_mode_e)(__MODE__)}
 +
                                                ^
 +
/libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: note: in expansion of macro '_GPIO_DEF'
 +
#define DEF_GPIOX(__PIN, __MODE) _GPIO_DEF(2, __PIN, __MODE) ///< same as #DEF_GPIOA for port X
 +
                                  ^
 +
../main.c:12:9: note: in expansion of macro 'DEF_GPIOX'
 +
  XXXX = DEF_GPIOX(XX, XX);
 +
</pre>
 +
'''''Solution:''''' The DEF_GPIOx macro MUST be used at declaration time, see [http://armebs4doc.hevs.ch/group__gpio.html gpios].

Latest revision as of 10:19, 26 August 2016

Contents

ARMEBS4 Troubleshooting and common problems

Tip : google for "ARMEBS4 your problem" can land you to this page ;)

No serial output (no printf)

  • Make sure you don't call bsp_init in your code, since bsp_init is already done.

Connection problems

When the programming fails, go to the openocd console, searching for "Error:" messages

Wrong driver

openocd console

...
Error: failed to reset FTDI device: -1
Error: unable to open ftdi device with vid 08ee, pid 3100, description '*' and serial '*'

Solution: The driver is wrong, run zadig.exe, "options -> list all devices", select "armebs4 interface 0", select "WinUSB" driver -> Replace driver

Board not connected

openocd console

...
Error: no device found
Error: unable to open ftdi device with vid 08ee, pid 3100, description '*' and serial '*'

Solution:

  • Verify the USB debug connector is connected
  • Verify the PWR led, it should be on (green)

Another openocd is running

openocd console

...
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: no device found
Error: unable to open ftdi device with vid 08ee, pid 3100, description '*' and serial '*'

Solution:

  • A debug session is probably running. It must be stopped (Terminate) before starting another one

Problem occurred : 'Start GDB Server Job'

eclipse error window

'Start GDB Server Job' has encoutered a problem.
An internal error occurred during: "Start GDB Server Job".
java.lang.NullPointerException

Solution:

  • Verify in the "Debug configuration..", "Debugger tab" that all eclipse variable used are valid. This is typically a ${wockspace_loc:/} depending on a closed project.

Configuration problems

Problem occurred : 'Launching XXX'

eclipse error window

'Launching XXX' has encoutered a problem.
Error in services launch sequence
Error while launching command /openocd -c gdb_port 3333 -c telnet_port 4444 -f ...\libheivs_stm32\armebs4.cfg
Error while launching command /openocd -c gdb_port 3333 -c telnet_port 4444 -f ...\workspace\libheivs_stm32\armebs4.cfg
Cannot run program "/openocd": Launching failed

Solution:

  • openocd not found, set the openocd_path variable to the openocd path
  • on Linux, OPENOCD_PATH should be set to /usr

CreateProcess: No such file or directory

eclipse build console

arm-none-eabi-gcc.exe: error: CreateProcess: No such file or directory

Solution:

  • Windows seems to have problems with very long command lines (> 32767 characters, see here). Workaround : try to reduce the command line size (don't compile/link) unnecessary files, or move the project to a shorter path.

libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: error: expected expression before '{' token

eclipse build console

libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: error: expected expression before '{' token
 #define _GPIO_DEF(__CTRL__, __PIN__, __MODE__) {.ctrl = __CTRL__, .nr = __PIN__, .mask = (1<<__PIN__), .mode = (enum gpio_mode_e)(__MODE__)}
                                                ^
/libheivs_stm32/include/heivs/stm32_gpio.h:XX:XXX: note: in expansion of macro '_GPIO_DEF'
 #define DEF_GPIOX(__PIN, __MODE) _GPIO_DEF(2, __PIN, __MODE) ///< same as #DEF_GPIOA for port X
                                  ^
../main.c:12:9: note: in expansion of macro 'DEF_GPIOX'
  XXXX = DEF_GPIOX(XX, XX);

Solution: The DEF_GPIOx macro MUST be used at declaration time, see gpios.

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox