To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1223
1222  |  1224
Subject: 
Re: Persistent globals
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 18 Jul 2000 08:13:23 GMT
Viewed: 
1563 times
  
Just insert __persistent between the variable name and equal sign followed
by a value. You need an initializer for the data, else it will not be put
into .strings, but into .bss

The sample code implements a persistent counter counting the runs of the
program starting with 0.

<example code>

This worked great for us using legOS 0.2.4. Thanks Eddie!

Regards
Tobias



Message is in Reply To:
  Re: Persistent globals
 
(...) legOS 0.2.3 or 0.2.4 will load .strings and .rodata sections just like the .text section. With this you can achive persistent data by storing your variables into the .strings section. There are some nice features in gcc to help with this. Just (...) (24 years ago, 16-Jul-00, to lugnet.robotics.rcx.legos)

12 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR