Hallo!
I am working on a project for the IWRL6432 and have discovered that the execution gets stuck in the boot when the program image size exceeds a certain limit.
To test my theory, I have allocated space for a constant dummy array in the LED blink example and I see that when the size of the array passes 315000 bytes, the program does not start, which I interpret as the boot rejecting the meta image.
I use the CCS project and makefile_ccs_bootimage_gen to build and create the metafile that I download using arprog_cmdline.py.
MulticoreImageGen has an argument for shared memory usage, which may need to be changed, but I can't find any MulticoreImageGen documentation that applies to IWRL6432, so I've kept the setting in the example's makefile_ccs_bootimage_gen, i.e. 0.
I am now wondering what causes the simple program not to start when the image becomes too large.
I have attached my gpio_led_blink.c file and I have used MMWAVE_L_SDK_05_01_00_04 for my tests.
BR Honke
/*
* Copyright (C) 2021 Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <drivers/gpio.h>
#include <kernel/dpl/AddrTranslateP.h>
#include <kernel/dpl/DebugP.h>
#include <kernel/dpl/ClockP.h>
#include "ti_drivers_config.h"
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"
/*
* This example configures a GPIO pin connected to an LED on the EVM in
* output mode.
* The application toggles the LED on/off for 10 seconds and exits.
*/
#define DUMMY_SIZE 320000
volatile const uint8_t aDummy[DUMMY_SIZE] = {0};
void gpio_led_blink_main(void *args)
{
uint32_t loopcnt = 5, delaySec = 1;
uint32_t gpioBaseAddr, pinNum;
/* Open drivers to open the UART driver for console */
Drivers_open();
Board_driversOpen();
while (1)
{
DebugP_log("GPIO LED Blink Test Started ...\r\n");
DebugP_log("LED will Blink for %d seconds ...\r\n", (loopcnt * delaySec * 2));
/* Get address after translation translate */
gpioBaseAddr = (uint32_t) AddrTranslateP_getLocalAddr(CSL_APP_GIO_U_BASE);
pinNum = GPIO_LED_PIN;
GPIO_setDirMode(gpioBaseAddr, pinNum, GPIO_LED_DIR);
loopcnt = 5;
while(loopcnt > 0)
{
GPIO_pinWriteHigh(gpioBaseAddr, pinNum);
ClockP_sleep(delaySec);
GPIO_pinWriteLow(gpioBaseAddr, pinNum);
ClockP_sleep(delaySec);
loopcnt--;
}
if (aDummy[0] == 0)
{
ClockP_sleep(10);
}
else if (aDummy[DUMMY_SIZE-1] == 0xFF)
{
ClockP_sleep(20);
}
DebugP_log("GPIO LED Blink Test Passed!!\r\n");
DebugP_log("All tests have passed!!\r\n");
}
Board_driversClose();
Drivers_close();
}
