This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C1294NCPDT: Fault ISR problem with calling functions from ROM

Part Number: TM4C1294NCPDT

Tool/software: Code Composer Studio

Dear Champs,

I have modify test function address more than the 0x00080000, 

and call ROM function,  the program always jumped into theFaultISR().

but  only modify address to less than 0x008000   or only modify call function without ROM

 it works fine.

Could you kindly tell us why Fault ISR occurred,thanks

void main(void)
{
/* Initialize the device */
// Initialization MCU
ConfigureMCU();

// let user know system is restart

test(); //0x00080000, 

while (1)
{

}
}

#pragma CODE_SECTION(test, ".flash_bl"); // 0x00080000
void test(void)
{

//SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
//SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
//SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOQ);

ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOQ);

while(1)
{

}
}

  • Hi Jimmy,

      I just tried the TivaWare hello example with some modification to use the pragma and map the ConfigureUART function to 0x08000. It works for me. 

    #pragma CODE_SECTION(ConfigureUART, "my_section");
    void
    ConfigureUART(void)
    {
    //
    // Enable the GPIO Peripheral used by the UART.
    //
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

    //
    // Enable UART0
    //
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

    //
    // Configure GPIO Pins for UART mode.
    //
    ROM_GPIOPinConfigure(GPIO_PA0_U0RX);
    ROM_GPIOPinConfigure(GPIO_PA1_U0TX);
    ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

    //
    // Initialize the UART for console I/O.
    //
    UARTStdioConfig(0, 115200, g_ui32SysClock);
    }

    Below is the linker command file.

    SECTIONS
    {
    .intvecs: > APP_BASE
    .text : > FLASH
    .const : > FLASH
    .cinit : > FLASH
    .pinit : > FLASH
    .init_array : > FLASH
    my_section : > 0x08000

    .vtable : > RAM_BASE
    .data : > SRAM
    .bss : > SRAM
    .sysmem : > SRAM
    .stack : > SRAM
    }

    Below is the .map file.

    my_section
    * 0 00008000 0000005c
    00008000 0000005c hello.obj (my_section:ConfigureUART)

  • Today - "Sir Charles" is on FIRE!     Once again - above/beyond - well done.     ***   LIKE   ***     (eased Button Click - REMAINS SORELY MISSED!)

    Is it not true that poster's (hidden code (below)) has (both) complicated & extended your efforts?

    /* Initialize the device */
    // Initialization MCU
    ConfigureMCU();

    Posters should provide, "ALL of the pertinent Set-Ups/Configs" - which LESSEN the (unfair) demands placed upon vendor staff (and even upon we hapless/feeb - outside agitators!)