Hi, I tried Chibios after a long time. Has anything changed in debuging? If I stop the program in the main routine, the chibios plugin reads the Chibios status and everithing is OK. But if I stop the program in ISR, the plugin writes Chibios not found on target. Thank you.
ChibiStudio Preview 21
ChibiOS 1.9.3
ChibiOS Eclipse debug view
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: ChibiOS Eclipse debug view
Hi,
This should not be the case, it is possible you had a stack overflow corrupting the threads list or something else.
Try placing a breakpoint in an ISR and check.
Giovanni
This should not be the case, it is possible you had a stack overflow corrupting the threads list or something else.
Try placing a breakpoint in an ISR and check.
Giovanni
-
- Posts: 44
- Joined: Sat Mar 16, 2013 5:57 pm
- Location: Czech Republic
- Has thanked: 2 times
- Been thanked: 6 times
Re: ChibiOS Eclipse debug view
Hi,
I did a long debug until I found a curious mistake. In DAC callback I used the variable ch. If breakpoint is set in main, everything is fine, if breakpoint is set to DAC callback, plugin reports Chibios not found.
I don't exactly understand the problem when variable ch is defined as local.
I did a long debug until I found a curious mistake. In DAC callback I used the variable ch. If breakpoint is set in main, everything is fine, if breakpoint is set to DAC callback, plugin reports Chibios not found.
I don't exactly understand the problem when variable ch is defined as local.
Code: Select all
/*
* DAC streaming callback.
*/
size_t nx = 0, ny = 0, nz = 0;
static void end_cb1(DACDriver *dacp) {
uint32_t ch;
ch = 0;
nz++;
if (dacIsBufferComplete(dacp)) {
nx += DAC_BUFFER_SIZE / 2;
}
else {
ny += DAC_BUFFER_SIZE / 2;
}
if ((nz % 1000) == 0) {
palTogglePad(GPIOD, GPIOD_LED3);
}
}
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
-
- Posts: 44
- Joined: Sat Mar 16, 2013 5:57 pm
- Location: Czech Republic
- Has thanked: 2 times
- Been thanked: 6 times
Re: ChibiOS Eclipse debug view
OK, thank you. Here is complete project for F4 discovery.
ChibiStudio Preview 21
ChibiOS 1.9.3
GCC 7.0
I got only warning
main.c:63:12: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
ChibiStudio Preview 21
ChibiOS 1.9.3
GCC 7.0
I got only warning
main.c:63:12: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
- Attachments
-
- STM32F4xx-DAC.zip
- (17.41 KiB) Downloaded 165 times
Re: ChibiOS Eclipse debug view
Isn't 'ch' the name of the variable that OpenOCD looks for to identify a Chibios system?
If so, presumably the local ch is overriding the global one; so changing the variable name in the callback should at least work round the problem.
If so, presumably the local ch is overriding the global one; so changing the variable name in the callback should at least work round the problem.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 47 guests