Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

ECC under FreeRTOS

Posted by D.L. on October 30, 2008
Hi!

Does anyone have experience with Elliptic Curve Crpytography running under FreeRTOS? I'm currently working with an AT91SAM7X256 (ARM7TDMI). I tried to do some encryption with the MIRACL library from http://www.shamus.ie. There are no problems with "simple" operations with big numbers, e.g. the calculation of 50!. But when I try to execute an elliptic curve operation, everything stands still :(
The encryption works without FreeRTOS.

So has anyone experienced with this topic. Of course, it is also possible to use some other library - I'm not tied up to MIRACL.


Thanks

daniel

RE: ECC under FreeRTOS

Posted by Dave on October 30, 2008
I dont know about ECC, but a few pointers to look at first.

Does the algorithm use a lot of stack? Stack overflow is the most common problem. FreeRTOS includes some utilities to detect stack overflow.

Does the algorithm do anything using global variables, or is it in any other way not re entrant? If so then you will have to use guards if accessing the library from more than one task.

Does the algorithm attempt to perform any dynamic memory allocation using malloc? If so then you will need to ensure your linker script allocates a heap, or replace calls to malloc with pvPortMalloc().


RE: ECC under FreeRTOS

Posted by D.L. on October 30, 2008
Hi Dave!

Thanks a lot for your hints! I think, the library uses a lot of stack. I tried to dramatically reduce the memory-consumption of FreeRTOS and my program. I decreased the Heap-Size and disabled every unused part.
I tried to announce a StackOverflow with vApplicationStackOverflowHook but without success (there is no announcement). (configCHECK_FOR_STACK_OVERFLOW is set to 2).

The Lib has some switches which prevents it to allocate any vars. So everything is static and on the stack. It's used in only one thread. So I think there should not be a problem with reentrance or global variables.

I'm on my wits' end. What else can i do to analyze the problem?

RE: ECC under FreeRTOS

Posted by MEdwards on October 30, 2008
Did you increase the stack allocated to the task in the call to xTaskCreate?

RE: ECC under FreeRTOS

Posted by D.L. on October 31, 2008
Of course, I did not ;(
But again, my program is not running. I think I have to try a bare-metal implementation for this problem. But I'll keep at it and will try other things with FreeRTOS. I'm still impressed... :)


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists