Zungmann's fixes to compile simulator on Mac OS X, part 2.

Here: .bss section syntax is different.
This commit is contained in:
Phil Hord 2013-12-12 12:05:52 -05:00 committed by Markus Hitter
parent 5cd6cf50d8
commit c7150445af
7 changed files with 20 additions and 9 deletions

View File

@ -24,7 +24,7 @@
#undef DEFINE_TEMP_SENSOR
static uint8_t adc_counter;
static volatile uint16_t adc_result[NUM_TEMP_SENSORS] __attribute__ ((__section__ (".bss")));
static volatile uint16_t BSS adc_result[NUM_TEMP_SENSORS];
#define DEFINE_TEMP_SENSOR(name, type, pin, additional) \
((type == TT_THERMISTOR) || (type == TT_AD595)) ? (pin ## _ADC) : 255,

View File

@ -103,4 +103,8 @@
#error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please tell us via the forum thread
#endif
#ifndef BSS
#define BSS __attribute__ ((__section__ (".bss")))
#endif
#endif /* _ARDUINO_H */

8
dda.c
View File

@ -37,20 +37,20 @@
/// \var startpoint
/// \brief target position of last move in queue
TARGET startpoint __attribute__ ((__section__ (".bss")));
TARGET BSS startpoint;
/// \var startpoint_steps
/// \brief target position of last move in queue, expressed in steps
TARGET startpoint_steps __attribute__ ((__section__ (".bss")));
TARGET BSS startpoint_steps;
/// \var current_position
/// \brief actual position of extruder head
/// \todo make current_position = real_position (from endstops) + offset from G28 and friends
TARGET current_position __attribute__ ((__section__ (".bss")));
TARGET BSS current_position;
/// \var move_state
/// \brief numbers for tracking the current state of movement
MOVE_STATE move_state __attribute__ ((__section__ (".bss")));
MOVE_STATE BSS move_state;
/*! Inititalise DDA movement structures
*/

View File

@ -35,7 +35,7 @@ uint8_t mb_tail = 0;
/// slot will only be modified in interrupts until the slot is
/// is no longer live.
/// The size does not need to be a power of 2 anymore!
DDA movebuffer[MOVEBUFFER_SIZE] __attribute__ ((__section__ (".bss")));
DDA BSS movebuffer[MOVEBUFFER_SIZE];
/// check if the queue is completely full
uint8_t queue_full() {

View File

@ -18,7 +18,7 @@ static const uint8_t analog_mask = 0
#undef DEFINE_TEMP_SENSOR
static uint8_t adc_counter;
static volatile uint16_t adc_result[8] __attribute__ ((__section__ (".bss")));
static volatile uint16_t BSS adc_result[8];
//! Configure all registers, start interrupt loop
void analog_init() {

View File

@ -26,10 +26,10 @@ uint8_t last_field = 0;
#define crc(a, b) (a ^ b)
/// crude floating point data storage
decfloat read_digit __attribute__ ((__section__ (".bss")));
decfloat BSS read_digit;
/// this is where we store all the data for the current command before we work out what to do with it
GCODE_COMMAND next_target __attribute__ ((__section__ (".bss")));
GCODE_COMMAND BSS next_target;
/*
decfloat_to_int() is the weakest subject to variable overflow. For evaluation, we assume a build room of +-1000 mm and STEPS_PER_MM_x between 1.000 and 4096. Accordingly for metric units:

View File

@ -40,6 +40,13 @@
#define enable_transmit()
#undef USB_SERIAL
#undef BSS
#ifdef __MACH__ // Mac OS X
#define BSS __attribute__ ((__section__ ("__DATA,.bss")))
#else
#define BSS __attribute__ ((__section__ (".bss")))
#endif
#ifndef _SIMULATOR_H
#define _SIMULATOR_H