Did you enable CONFIG_DEBUG_CAN_INFO in your menuconfig? │ -> Build Setup │ │ -> Debug Options │ │ -> Enable Debug Features (DEBUG_FEATURES [=y]) │ │ -> CAN Debug Features (DEBUG_CAN [=y])
BR, Alan On 5/12/21, Tim <t...@jti.uk.com.invalid> wrote: >>From: Gregory Nutt <spudan...@gmail.com> >>Sent: 11 May 2021 18:33 >> >>> All this starts from the CAN init code crashing (SAMA5D27) when it >>> makes any call to print debug messages. Printf itself is fine. >>These kinds of crashes are often due to stack overrun. It might be worth >>increasing the stack size of the task that calls CAN init. > > > I have only just had a moment to take another look. This is the basic nsh > config, with just the CAN example enabled. Heap size is the standard 2048, > but if I increase to 4096 it still crashes in the same place: > > int sam_can_setup(void) > { > #if defined(CONFIG_CAN) > > int ret; > printf("PRINTF: Setting up CAN\n"); > #if defined CONFIG_DEBUG_CAN_INFO > > caninfo("CANINFO: Setting up CAN\n"); > while(1); > ...etc > > I get the printf text on the console but not the caninfo message. The > program is stopped in the while(1) loop. I still can't debug this, but > that's a different problem. If I use the Eclipse debugger to pause the > program it clearly states it has a thread for sam_can_setup() at sam_can.c > and is trying to find the source but Eclipse reports: > > Can't find a source file at > "/home/timh/nuttx/nuttx/boards/arm/sama5/jti-toucan2/src/sam_can.c" > Locate the file or edit the source lookup path to include its location. > > That is not the full path from a Windows POV which is quite possible the > issue - Windows knows the path as: > > C:\Users\TimHardisty\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWi > ndows_79rhkp1fndgsc\LocalState\rootfs\home\timh\nuttx\nuttx\boards\arm\sama5 > \jti-toucan2\src > > I have made sure that is the path configured in Eclipse, but it seems not > to > respect that. > > If you or anyone has other suggestions (and I will reply to the suggestions > others made in a moment) then I will give anything ago but I am currently > investigating either a 3rd machine to just run Ubuntu or a VM on my Win10 > machine or dual booting my Mac. But, quite probably, buying a machine is a > better bang for the buck, for me as a professional engineer, rather than > spending time playing around with VMs or other "tricks" that might work but > suck up time! If a £500 mini PC sorts it, then on reflection I'll be a > happy > chappy! > >