Sure, chThdCreateFromHeap().
However, usually dynamic allocation is not recommended in embedded systems.
Giovanni
Sorry, but that isn't correct by default. It really depends on every use-case and dynamic memory allocation can enable you to do things with a tiny embedded controller where others ...
Search found 5 matches
- Sat Sep 20, 2014 12:19 pm
- Forum: STM32 Support
- Topic: Dual-UART-USB Monitor problem
- Replies: 8
- Views: 3353
- Fri Sep 19, 2014 2:49 pm
- Forum: STM32 Support
- Topic: Dual-UART-USB Monitor problem
- Replies: 8
- Views: 3353
Re: Dual-UART-USB Monitor problem
Ah!
Ok, I thought the working area is reserved each time a thread is installed. A few years ago I ported NutOS to STM32 and there it is like
NutThreadCreate("t1", Thread1, 0, 512);
The threads memory is pulled from system heap ( in this case 512 bytes)
So I have to double the reservation of ...
Ok, I thought the working area is reserved each time a thread is installed. A few years ago I ported NutOS to STM32 and there it is like
NutThreadCreate("t1", Thread1, 0, 512);
The threads memory is pulled from system heap ( in this case 512 bytes)
So I have to double the reservation of ...
- Fri Sep 19, 2014 10:09 am
- Forum: STM32 Support
- Topic: Dual-UART-USB Monitor problem
- Replies: 8
- Views: 3353
Re: Dual-UART-USB Monitor problem
I modified the code to use a single thread per UART. And I use a blocking read per thread with a timeout of 10ms.
m
This seems to work, as long as there are not too much errors on the UART lines. If so, the whole things crashes pretty fast. I guess there is some work to do for the error handling ...
m
This seems to work, as long as there are not too much errors on the UART lines. If so, the whole things crashes pretty fast. I guess there is some work to do for the error handling ...
- Thu Sep 18, 2014 9:13 pm
- Forum: STM32 Support
- Topic: Dual-UART-USB Monitor problem
- Replies: 8
- Views: 3353
Re: Dual-UART-USB Monitor problem
Hi Giovanni, thank you for your reply!
Is I thought, there are probably mistakes and misunderstandings from me...
I'll try installing the Studio, sure. Thanks for the hint, I just flew over the comments and wasn't sure about the development state of the studio.
However:
While programming I read ...
Is I thought, there are probably mistakes and misunderstandings from me...
I'll try installing the Studio, sure. Thanks for the hint, I just flew over the comments and wasn't sure about the development state of the studio.
However:
While programming I read ...
- Thu Sep 18, 2014 5:47 pm
- Forum: STM32 Support
- Topic: Dual-UART-USB Monitor problem
- Replies: 8
- Views: 3353
Dual-UART-USB Monitor problem
Hi all,
First of all, I am not new to embedded and not new to STM32 programming. But this is my first Chibios project on an STM32.
I have most of the available STM32 dev kits but with Chibios I could only get the STm32F4-DISCOVERY to start a USB-CDC device successfully. This is no problem so far ...
First of all, I am not new to embedded and not new to STM32 programming. But this is my first Chibios project on an STM32.
I have most of the available STM32 dev kits but with Chibios I could only get the STm32F4-DISCOVERY to start a USB-CDC device successfully. This is no problem so far ...