Forum Replies Created
See the following IAR tech note about the CSTACK warning when using an RTOS
Your best reference is to take a look at the “Getting started” example that is provided from IAR and migrate the startup files and boot files to this project.
Our original project(https://www.micrium.com/download/mcimx6ul-evk_ping) does not initialize QSPI in any of the BSP functions.
The project was created with IAR version 8.20.1, so IAR must have done something to their printf libraries to cause this issue on their latest version using this MCU. APP_TRACE_INFO() uses printf to output to the Terminal I/O, and we do not have control over those libraries.
IAR also has a ‘Getting Started” project on the same board where I am able to replicate a similar behavior when changing the following options in the IAR project options.
General Options -> Library Configuration -> Library low-level interface implementation -> Choose Semihosted
General Options -> Library Options 1 -> check the box ‘Buffered terminal output’
These are the same configurations that our IAR 8.20.1 workspace is using.
You can also disable our project printf functionality by going to ‘app_cfg.h’ and changing the #define APP_CFG_TRACE_LEVEL to TRACE_LEVEL_OFF. However you will need to put a breakpoint at in AppTCPIP_PrintIPAddr() and check the local variables to see what is the IP address giving to the target.
If you still need printf functionality then follow the IAR ‘Getting started’ example and implement the low-level function size_t __write() and make sure to uncheck the box ‘Buffered terminal output’ from IAR project options.
if you are trying to understand how the port works, then you will benefit from reading the uCOS-III book(https://www.micrium.com/download/%C2%B5cos-iii-the-real-time-kernel-for-the-freescale-kinetis/). Chapter “Porting uC/OS-III” provides descriptions when adapting uC/OS-III to different processors/architectures.
The task creation on that port initializes the CPU register to default values as shown on OSTaskStkInit() in os_cpu_c.c file.
* Those functions are to protect the OSIdleTaskCtr and OSStatTaskCtr resources.
* You must never modified the Idle Task. If you need to do something during the idle task you should do it through the App Idle hook.
* if you are trying to Enable/Disable interrupts. Use CSP_IntEn()/CSP_IntDis()
* CPU_IntSrcDis(SystemCoreClock/1000); —-> this is completely incorrect use CSP_IntDis (CSP_INT_CTRL_NBR_MAIN,CSP_INT_SRC_NBR_EINT_02);
* CPU_IntSrcEn(SystemCoreClock/1000);—–> use CSP_IntEn (CSP_INT_CTRL_NBR_MAIN,CSP_INT_SRC_NBR_EINT_02);
* UART_PrintStr(“hello”); —-> Remove this code from your ISR for now and try to increment a global variable to see if you get the same results.
* Keep in mind that Micrium no longer supports CSP package.
could you please set Master 4 Access protection bit[9-8] in PFAPR register to “Only read accesses may be performed by this master”
FMC->PFAPR |= 0x00000100;
If you still have maintenance then you should be able to download it from your portal; otherwise, please contact our sales department at firstname.lastname@example.org.
The changes will be elsewhere; you will need to use Ports/ARM-Cortex-M/ files instead of Ports/ARM-Cortex-M4.
The new ARM-Cortex-M, which supports M3, M4 and M7, was released with uCOS-II v2.92.12
You will need to get the latest Micrium Cortex-M port that has been modified to support Floating point operation from an ISR and no longer needs to pass OS_TASK_OPT_SAVE_FP flag when creating a task to support FP.
You will not be able to import the library to Dave because the library file was created using IAR, so the example project will only run using IAR. Please contact email@example.com to get more information on getting a library file using DAVE tools.