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 / 2066
2065  |  2067
Subject: 
Re: RCX_COMPILER define
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 11 Sep 2001 22:12:02 GMT
Viewed: 
1715 times
  
I have been reading past posts to this group, and come across • references to
RCX_COMPILER, a define needed to be patched into gcc. I have used • the CygWin
default sources, and the compiler produced successfully recompiled • the legOS
kernel, but I am worried that there may be a lurking bug due to the • absence
of the RCX_COMPILER patch.

What RCX_COMPILER does is to add an optimization inside GCC for ISR on
RCX platform.

GCC without RCX_COMPILER patch should compile without problems any
project. You should only take care of ISR function using a syntax
like:

--------
//! battery indicator handler, called from system timer interrupt
#ifdef CONF_RCX_COMPILER
void battery_refresh(void) {
#else
HANDLER_WRAPPER("battery_refresh","battery_refresh_core");
void battery_refresh_core(void) {
#endif
--------

Here is the HANDLER_WRAPPER definition from irq.h:

--------
#ifdef CONF_RCX_COMPILER
#define HANDLER_WRAPPER(wrapstring,handstring)
#else
#define HANDLER_WRAPPER(wrapstring,handstring) \
__asm__ (".text\n.align 1\n.global _" wrapstring "\n_" wrapstring \
": push r0\npush r1\npush r2\npush r3\njsr @_" handstring \
"\npop r3\npop r2\npop r1\npop r0\nrts\n")
#endif
--------

Bye,
     Paolo.

---
Etorre's Observation: The other line moves faster.



Message is in Reply To:
  RCX_COMPILER define
 
I am a new legOS user. Here is summary of my setup: CygWin 1.3.2 and associated bits. h8300-hms targeted binutils and gcc built from the CygWin source tarballs. I have been reading past posts to this group, and come across references to (...) (23 years ago, 13-Jul-01, to lugnet.robotics.rcx.legos)

2 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