Squashed commit of the following:
arch/arm/src/max326xx/max32660/max32660_clockconfig.c: Fix an error in a register name. arm/src/max326xx/max32660: Fix a few new compilation errors when DEBUG is enabled.
This commit is contained in:
parent
c82032ba62
commit
0820d0659b
@ -155,7 +155,7 @@ static void max326_enable_hfio(FAR const struct clock_setup_s *clksetup)
|
||||
|
||||
/* Wait for the oscillator to become ready */
|
||||
|
||||
while ((getreg32(GCR_CLKCTRL_HIRCRDY) & GCR_CLKCTRL_HIRCRDY) == 0)
|
||||
while ((getreg32(MAX326_GCR_CLKCTRL) & GCR_CLKCTRL_HIRCRDY) == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -343,10 +343,6 @@ void max326_uart_configure(uintptr_t base,
|
||||
ctrl0 |= UART_CTRL0_TOCNT(4);
|
||||
putreg32(ctrl0, base + MAX326_UART_CTRL0_OFFSET);
|
||||
|
||||
/* Enable trigger events */
|
||||
|
||||
DEBUGASSERT(config->)
|
||||
|
||||
/* Setup configuration and enable UART */
|
||||
|
||||
ctrl0 &= ~UART_CTRL0_SIZE_MASK;
|
||||
|
@ -126,6 +126,12 @@
|
||||
#define UART_INT_RXERRORS (UART_INT_FRAME | UART_INT_PARITY | \
|
||||
UART_INT_RXOVR)
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
# define UART_INT_ALL (UART_INT_TX | UART_INT_RX | UART_INT_RXERRORS)
|
||||
#else
|
||||
# define UART_INT_ALL (UART_INT_TX | UART_INT_RX)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
@ -519,7 +525,8 @@ static int max326_interrupt(int irq, void *context, FAR void *arg)
|
||||
/* Read and clear FIFO interrupt status */
|
||||
|
||||
regval = max326_serialin(priv, MAX326_UART_STAT_OFFSET);
|
||||
max326_serialout(priv, MAX326_UART_STAT_OFFSET, regval);
|
||||
max326_serialout(priv, MAX326_UART_STAT_OFFSET,
|
||||
regval & UART_INT_ALL);
|
||||
|
||||
/* Handle incoming, receive bytes.
|
||||
* Check if the received FIFO is not empty.
|
||||
@ -548,10 +555,11 @@ static int max326_interrupt(int irq, void *context, FAR void *arg)
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
/* Check for RX error conditions */
|
||||
|
||||
if ((regval & MAX326_INT_RXERRORS) != 0)
|
||||
if ((regval & UART_INT_RXERRORS) != 0)
|
||||
{
|
||||
/* And now do... what? Should we reset FIFOs on a FIFO error? */
|
||||
#warning Misssing logic
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -88,6 +88,9 @@ Buttons
|
||||
OpenOCD
|
||||
=======
|
||||
|
||||
Starting OpenOCD
|
||||
----------------
|
||||
|
||||
An Eclipse based toolchain is available for download from Maxim Integrated.
|
||||
If you (like me) are not an IDE user then the good news is the OpenOCD for
|
||||
the MAX32660 is available within that toolchain.
|
||||
@ -110,4 +113,29 @@ OpenOCD
|
||||
IFCFG="C:\Maxim\Toolchain\share\openocd\scripts\interface\max32660_hdk.cfg"
|
||||
MCUCFG="C:\Maxim\Toolchain\share\openocd\scripts\target\max32660.cfg"
|
||||
|
||||
${OPENOCD} -f ${IFCFG} -f ${MCUCFG}
|
||||
${OPENOCD} ${1} -f ${IFCFG} # -f ${MCUCFG}
|
||||
|
||||
Loading Code:
|
||||
|
||||
Code can be loaded into FLASH using the convenient ARM MBED drag'n'drop
|
||||
interface. Or it can be loaded using GDB as follows:
|
||||
|
||||
$ arm-none-eabi-gdb
|
||||
(gdb) target remote localhost:3333
|
||||
(gdb) mon reset
|
||||
(gdb) mon halt
|
||||
(gdb) load nuttx
|
||||
|
||||
This does not work so reliably for me, however.
|
||||
|
||||
Debugging:
|
||||
|
||||
$ arm-none-eabi-gdb
|
||||
(gdb) target remote localhost:3333
|
||||
(gdb) mon reset
|
||||
(gdb) mon reg pc 0x11c
|
||||
(gdb) file nuttx
|
||||
(gdb) b os_start
|
||||
(gdb) c
|
||||
|
||||
Also not very reliable.
|
||||
|
Loading…
Reference in New Issue
Block a user