This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Program skipping reset handler and system init in .s file right to a logging function

Hello,

To my understanding, normally, either after a reset or powering up, the program should first run to Reset_Handler, then SystemInit, then __main.

Somehow, my program runs to none of the places above, and if you F11 all the way down (I'm using keil uv5), it will eventually hit this function:

uint32_t log_vprintf(uint32_t dbg_level, const char * p_filename, uint16_t line,
    uint32_t timestamp, const char * format, va_list arguments)
{
    uint32_t status = NRF_SUCCESS;
    if(m_log_callback != NULL)
    {
        status = m_log_callback(dbg_level, p_filename, line, timestamp, format, arguments);
    }

    return status;
}

(I'm trying to port the provisionee program of BLE Mesh to my board, and this is a module called "log.c" BTW. )

Or if you hit F5 on keyboard and let it run, it will go through none of those function (I set breakpoints there), and eventually stop at here, which is a random place by the look of it:

image description

And this is what it looks like at address 0x633abb86:

image description

Any idea how to approach this problem?

Edit: here's the project file, including the official program files and the softdevice which I'm using (S140 alpha 1):

Extract to a directory in F.7z

Extract it to a directory in F: with the name "BLE Mesh Official" and you should be good to go. Otherwise you may need to spend some time doing the inclusion path modification in the magic wand.

Parents Reply Children
No Data
Related