Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-27 Thread Matias N.
master/platforms/nuttx/src/px4/stm/stm32_common/version/board_mcu_version.c >> to ID the chip and version. >> >> David >> >> >> -----Original Message- >> From: Matous Pokorny [mailto:matous.pokorny@datavision.software] >> Sent: Monday, Jun

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-22 Thread Matias N.
ms/nuttx/src/px4/stm/stm32_common/version/board_mcu_version.c > to ID the chip and version. > > David > > > -Original Message- > From: Matous Pokorny [mailto:matous.pokorny@datavision.software] > Sent: Monday, June 22, 2020 6:12 AM > To: dev@nuttx.apache.org >

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-22 Thread Matias N.
Thanks for all the suggestions. When I feel brave enough I will attack this problem again and try your ideas. After almost a full day hitting the day against this issue I decided to work with flash image less than 256KB for the moment and continue with the project. Best, Matías On Mon, Jun

RE: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-22 Thread David Sidrane
Firmware/blob/master/platforms/nuttx/src/px4/stm/stm32_common/version/board_mcu_version.c to ID the chip and version. David -Original Message- From: Matous Pokorny [mailto:matous.pokorny@datavision.software] Sent: Monday, June 22, 2020 6:12 AM To: dev@nuttx.apache.org Subject: Re: MCU only

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-22 Thread Matous Pokorny
Hello, I do not have the answer to your question. I have some notes which could help you. 1) Check the boot issues related to dual bank flash as mentioned. You have the part number with dual bank. Check the option bytes as well. 2) I met the problem that SW reset does not work if you have SWDIO

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Matias N.
Ah, it is STM32L476RET. So, that wouldn't be the problem, but I have to check the errata for this chip. It is 62 pages long =| On Sun, Jun 21, 2020, at 19:50, Gregory Nutt wrote: > On 6/21/2020 4:36 PM, Gregory Nutt wrote: > > > >> I will consider this possibilities, thanks. > >> > >> What is

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Gregory Nutt
On 6/21/2020 4:36 PM, Gregory Nutt wrote: I will consider this possibilities, thanks. What is driving me crazy is that it actually seems to be triggered by the binary being bigger than 256KB (MCU has 512KB, dual bank). I already had to use openocd from git since it would not flash the

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Gregory Nutt
I will consider this possibilities, thanks. What is driving me crazy is that it actually seems to be triggered by the binary being bigger than 256KB (MCU has 512KB, dual bank). I already had to use openocd from git since it would not flash the image in that case. Now openocd flashes

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Matias N.
I will consider this possibilities, thanks. What is driving me crazy is that it actually seems to be triggered by the binary being bigger than 256KB (MCU has 512KB, dual bank). I already had to use openocd from git since it would not flash the image in that case. Now openocd flashes correctly.

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Gregory Nutt
The appropriate thing to do would be to check reset signal using an oscilloscope but i don't have one here. Anyway, I simply wanted to ask if by any chance this could be due to some oversight related to how the non-optimized build could affect this, based on someone else experience with

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Matias N.
The appropriate thing to do would be to check reset signal using an oscilloscope but i don't have one here. Anyway, I simply wanted to ask if by any chance this could be due to some oversight related to how the non-optimized build could affect this, based on someone else experience with the

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Adam Feuer
Do you have GPIO available? If so you can do the equivalent of printf debugging by using GPIO... for instance outputting a binary number using 5 GPIOs would give you 32 possible points to mark your code with. Or just use unary and change a different GPIO for every point you want to mark. -adam

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Matias N.
I have the serial console enabled, but this is very early in the boot. On Sun, Jun 21, 2020, at 18:02, Adam Feuer wrote: > (printf debugging only works if you can get far enough through the boot > sequence to initialize a serial console. But that can happen pretty early.) > > > On Sun, Jun 21,

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Adam Feuer
(printf debugging only works if you can get far enough through the boot sequence to initialize a serial console. But that can happen pretty early.) On Sun, Jun 21, 2020 at 2:01 PM Adam Feuer wrote: > Do you have a serial console available? If so, you could use printf > debugging

Re: MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Adam Feuer
Do you have a serial console available? If so, you could use printf debugging to determine where in the boot sequence it fails. I've done this with NuttX successfully on the SAMA5. -adam On Sun, Jun 21, 2020 at 12:13 PM Matias N.

MCU only booting from reset via SWD when compiled without optimizations?

2020-06-21 Thread Matias N.
I've been having a very weird problem and I thought to ask if anyone else suffered this by any chance. I have a board with reset line with pull-up and a switch to tie the line to ground (with a capacitor in parallel) as per typical STM32 circuit. This line also is exposed to the SWD connector.