Zungmann's fixes to compile simulator on Mac OS X, part 2.
Here: .bss section syntax is different.
This commit is contained in:
parent
5cd6cf50d8
commit
c7150445af
2
analog.c
2
analog.c
|
|
@ -24,7 +24,7 @@
|
||||||
#undef DEFINE_TEMP_SENSOR
|
#undef DEFINE_TEMP_SENSOR
|
||||||
|
|
||||||
static uint8_t adc_counter;
|
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) \
|
#define DEFINE_TEMP_SENSOR(name, type, pin, additional) \
|
||||||
((type == TT_THERMISTOR) || (type == TT_AD595)) ? (pin ## _ADC) : 255,
|
((type == TT_THERMISTOR) || (type == TT_AD595)) ? (pin ## _ADC) : 255,
|
||||||
|
|
|
||||||
|
|
@ -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
|
#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
|
#endif
|
||||||
|
|
||||||
|
#ifndef BSS
|
||||||
|
#define BSS __attribute__ ((__section__ (".bss")))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ARDUINO_H */
|
#endif /* _ARDUINO_H */
|
||||||
|
|
|
||||||
8
dda.c
8
dda.c
|
|
@ -37,20 +37,20 @@
|
||||||
|
|
||||||
/// \var startpoint
|
/// \var startpoint
|
||||||
/// \brief target position of last move in queue
|
/// \brief target position of last move in queue
|
||||||
TARGET startpoint __attribute__ ((__section__ (".bss")));
|
TARGET BSS startpoint;
|
||||||
|
|
||||||
/// \var startpoint_steps
|
/// \var startpoint_steps
|
||||||
/// \brief target position of last move in queue, expressed in 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
|
/// \var current_position
|
||||||
/// \brief actual position of extruder head
|
/// \brief actual position of extruder head
|
||||||
/// \todo make current_position = real_position (from endstops) + offset from G28 and friends
|
/// \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
|
/// \var move_state
|
||||||
/// \brief numbers for tracking the current state of movement
|
/// \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
|
/*! Inititalise DDA movement structures
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ uint8_t mb_tail = 0;
|
||||||
/// slot will only be modified in interrupts until the slot is
|
/// slot will only be modified in interrupts until the slot is
|
||||||
/// is no longer live.
|
/// is no longer live.
|
||||||
/// The size does not need to be a power of 2 anymore!
|
/// 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
|
/// check if the queue is completely full
|
||||||
uint8_t queue_full() {
|
uint8_t queue_full() {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ static const uint8_t analog_mask = 0
|
||||||
#undef DEFINE_TEMP_SENSOR
|
#undef DEFINE_TEMP_SENSOR
|
||||||
|
|
||||||
static uint8_t adc_counter;
|
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
|
//! Configure all registers, start interrupt loop
|
||||||
void analog_init() {
|
void analog_init() {
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,10 @@ uint8_t last_field = 0;
|
||||||
#define crc(a, b) (a ^ b)
|
#define crc(a, b) (a ^ b)
|
||||||
|
|
||||||
/// crude floating point data storage
|
/// 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
|
/// 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:
|
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:
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,13 @@
|
||||||
#define enable_transmit()
|
#define enable_transmit()
|
||||||
#undef USB_SERIAL
|
#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
|
#ifndef _SIMULATOR_H
|
||||||
#define _SIMULATOR_H
|
#define _SIMULATOR_H
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue