forte+freertos+lwip on stm32 flash problem [message #1827389] |
Wed, 13 May 2020 23:24  |
Eclipse User |
|
|
|
I did as
https://www.eclipse.org/4diac/en_help.php?helppage=html/installation/freeRTOSLwIP.html
the libforte-static.a library is 2570kb
if i check the iec61131 moduble, then the file will be very large,
then i complied the library with freertos and lwip,
the bin file will be over 512k, it runs out off the 512k flash.
Any experience?
The second problem is when i debug
static void forte_thread(void *arg)
{
forteGlobalInitialize();
TForteInstance forteInstance = 0;
int resultForte = forteStartInstanceGeneric(0, 0, &forteInstance);
if(FORTE_OK == resultForte){
forteJoinInstance(forteInstance);
}else{
printf("Error %d: Couldn't start forte\n", resultForte);
}
forteGlobalDeinitialize();
vTaskDelete(NULL);
}
int resultForte = forteStartInstanceGeneric(0, 0, &forteInstance);
this line is hang up, why?
[Updated on: Thu, 14 May 2020 03:54] by Moderator
|
|
|
|
Re: forte+freertos+lwip on stm32 flash problem [message #1828053 is a reply to message #1827429] |
Sat, 30 May 2020 11:47   |
Eclipse User |
|
|
|
Thank you for your so nice advice,
yes, now i have the problem of RAM, my device is stm32F407ZET6,
it's with 512k flash and 128k ram,the Eth is W5500,
in definition:
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityHigh,
.stack_size = 128 * 4
};
/* Definitions for Task02 */
osThreadId_t Task02Handle;
const osThreadAttr_t Task02_attributes = {
.name = "Task02",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 128 * 50
};
in main()
defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes);
void StartDefaultTask(void *argument)
{
lwipInit();
Task02Handle = osThreadNew(forte_thread, NULL, &Task02_attributes);
vTaskDelete(NULL);
}
the forte version is 1.11 the freertos is 10.2.1 ,the lwip is 2.1.2,
the libforte-static.a is ready on windows with trueStudio, tool-chain is
arm-atollic-eabi.
it seems not enough ram according to the suspending thread stack
even I change
osThreadId_t Task02Handle;
const osThreadAttr_t Task02_attributes = {
.name = "Task02",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 128 * 50
};
to 128*80 it didn't work
Attachment: snap1.jpg
(Size: 30.18KB, Downloaded 100 times)
[Updated on: Sat, 30 May 2020 11:51] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: forte+freertos+lwip on stm32 flash problem [message #1828521 is a reply to message #1828518] |
Thu, 11 June 2020 05:53  |
Eclipse User |
|
|
|
If you read the documentation it is stated in some cases it is not called and only in the cases when it is not called you should call it by yourselve. The better solution is always to have a standard LD file and a standard startup procedure where this is handled.
|
|
|
Powered by
FUDForum. Page generated in 0.97188 seconds