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


write to buffer

Posted by Nobody/Anonymous on December 2, 2005
MY question is how write something to an ARM7 buffer.
e.g. at webserver project erverytime LED flashes a counter increments. This variable i need in buffer or somewhere else i can use it at an other task.

RE: write to buffer

Posted by Jokke on December 2, 2005
Any global variable (not static) will be available to all tasks.
If the accesses are not atomic (in ARM, a 32 bit read or write is atomic), or if you like software with nice structure, you can write a set of functions to handle your data buffer, and if needed protect it with some semaphore.


RE: write to buffer

Posted by Nobody/Anonymous on December 9, 2005
i tryed to define a global variable ( at main.c infornt of main() but it is not known to any other funktion. it is called u8_t test. at the funtktion i need this variable (cgi.c) i defined extern test but it is still unknown.

where should i define a globla variable i think it is the worng place or the wrong way

i read a global variable is definded in front of main() but i thig this time it is only known in main.c an not any whre else...

RE: write to buffer

Posted by Nobody/Anonymous on December 9, 2005
Don't know which compiler you are using - but to the C standard what you are doing is correct.

Declare in main.c as u8_t test, then reference in cgi.c as extern u8_t test.

test must NOT be declared static.

RE: write to buffer

Posted by Nobody/Anonymous on December 10, 2005
this i tryed ( i use Rowley crossstudio) but it is still unkonwn.

[ 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