SIGINT error during the beginning of debugging session?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SIGINT error during the beginning of debugging session?

2,524 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by funkyguy4000 on Fri Nov 20 11:54:36 MST 2015
Hello,

I've been trying to get a very simple I2C program running on only the M0 core of an LPC43s37 controller.  The project is just a standalone Cortex-M0 LPCxpresso C++ project.  Although as soon as I attempt to debug it, the debug session is suspended with a SIGINT signal.
I've attached what I see in the debug window after I've started debugging.
The source is very simple:

I'm including the i2c_18xx_43xx.h and the 12c_common_18xx_43xx.h headers and then my source folder has the standard cr_app_config.cpp, cr_startup_lpc43xx-m0app.cpp, sysinit.c, and then I've added the i2c_18xx_43xx.c.  My main source file is "attempt.cpp" and is as follows:

#if defined (__USE_LPCOPEN)
#if defined(NO_BOARD_LIB)
#include "chip.h"
#else
#include "board.h"
#endif
#endif

#include <cr_section_macros.h> //I have the cr_section_macros.h included here, it isn't displaying on the forum page for some reason.
#include "i2c_18xx_43xx.h"

// TODO: insert other include files here

// TODO: insert other definitions and declarations here
I2C_XFER_T  tempSensor;
static uint8_t rxBuffer[256];
static uint8_t txBuffer[256];


void SetupI2C1( void ){
Chip_I2C_Init( I2C0 );//Activate I2C for R3 layout
Chip_I2C_SetClockRate( I2C0 , 100000 );//Set I2C1 to 400kHz operation "fast mode"

}

int main(void) {

#if defined (__USE_LPCOPEN)
    // Read clock settings and update SystemCoreClock variable
    SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
#if defined (__MULTICORE_MASTER) || defined (__MULTICORE_NONE)
    // Set up and initialize all required blocks and
    // functions related to the board hardware
    Board_Init();
#endif
    // Set the LED to the state of "On"
    Board_LED_Set(0, true);
#endif
#endif

    // TODO: insert code here
    uint8_t TmpAddr = 0x48;//1001000
    uint8_t TempAddr = 0x00;
    txBuffer[0] = TempAddr;

    tempSensor.slaveAddr = TmpAddr;
    tempSensor.txSz = 1;
    tempSensor.rxSz = 2;
    tempSensor.txBuff = txBuffer;
    tempSensor.rxBuff = rxBuffer;

    SetupI2C1();
    // Force the counter to be placed into memory
    volatile static int i = 0 ;
    // Enter an infinite loop, just incrementing a counter
    while(1) {
        i++ ;
        Chip_I2C_MasterRead( I2C0, tempSensor.slaveAddr, tempSensor.rxBuff, tempSensor.rxSz);

        DEBUGOUT("%d" , rxBuffer);
    }
    return 0 ;
}


Am I totally missing something?  I have the LPCxpresso43s37 connected up and the jumpers are all correct per the UM10889 document
0 Kudos
Reply
3 Replies

2,479 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Nov 20 15:24:55 MST 2015
Yes, it is always true. That is why you can't connect and debug your application.
0 Kudos
Reply

2,479 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by funkyguy4000 on Fri Nov 20 14:50:04 MST 2015
This is true even where the M0 project is created by the wizard?  I knew that was how it was for multi-core projects.

0 Kudos
Reply

2,479 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Nov 20 12:47:38 MST 2015
The m0 MUST first be booted by the m4. The M0 is held in reset until this happens. Read the user manual, the FAQ on lpc43xx and the example prog arms supplied with LPCXpresso
0 Kudos
Reply