2018-03-01 05:34 AM
If the check box 'floating point number' is unchecked in 'Model Configuration Parameters':
the following codeto configure the system timer is still generated:
/* USER CODE BEGIN 2 */
/* Systick configuration and enable SysTickHandler interrupt */
if (SysTick_Config((uint32_t)(SystemCoreClock * 0.001))) {
autoReloadTimerLoopVal_S = 1;
do {
autoReloadTimerLoopVal_S++;
} while ((uint32_t)(SystemCoreClock * 0.001)/autoReloadTimerLoopVal_S >
SysTick_LOAD_RELOAD_Msk);
SysTick_Config((uint32_t)(SystemCoreClock * 0.001)/autoReloadTimerLoopVal_S);
}
remainAutoReloadTimerLoopVal_S = autoReloadTimerLoopVal_S;//Set nb of loop to do
/* USER CODE END 2 */
�?�?�?�?�?�?�?�?�?�?�?�?
where 0.001 is the model execution time step specified in the Simulink model.
If replace this code to
/* USER CODE BEGIN 2 */
/* Systick configuration and enable SysTickHandler interrupt */
if (SysTick_Config((uint32_t)(SystemCoreClock / 1000))) {
autoReloadTimerLoopVal_S = 1;
do {
autoReloadTimerLoopVal_S++;
} while ((uint32_t)(SystemCoreClock / 1000)/autoReloadTimerLoopVal_S >
SysTick_LOAD_RELOAD_Msk);
SysTick_Config((uint32_t)(SystemCoreClock / 1000)/autoReloadTimerLoopVal_S);
}
remainAutoReloadTimerLoopVal_S = autoReloadTimerLoopVal_S;//Set nb of loop to do
/* USER CODE END 2 */�?�?�?�?�?�?�?�?�?�?�?�?
then footprintsize is reduced by 4K.
4К, for a minute, is1/4of the total size of the STM32F030F4 flash memory!
My Simulink model took up less space than this library!
Well, it is not optimal toadd 4К size floating pointlibrary only for the sake of one-time calculation!
P.S.
I do not think that by this post I will open America for anyone who is involved in the development of this product! Most likely, this is a conscious victim! But it would like to see this issue solved in future releases!
Thanks!
#stm32-mat/target-matlab #simulink2018-03-05 02:06 AM
Hi, Dima
I have implemented a fix I will send you as soon as possible.
Best regards,