Skip to content

Commit f1e6a72

Browse files
committed
Merge pull request #127 from Links2004/esp8266
ram macro, fix warnings, #125
2 parents 196992a + 29cf4c4 commit f1e6a72

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

hardware/esp8266com/esp8266/cores/esp8266/Arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ void ets_intr_unlock();
108108
typedef unsigned int word;
109109

110110
#define bit(b) (1UL << (b))
111+
#define _BV(b) (1UL << (b))
111112

112113
typedef uint8_t boolean;
113114
typedef uint8_t byte;

hardware/esp8266com/esp8266/cores/esp8266/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ UARTnr_t uart_get_debug();
101101
// ####################################################################################################
102102
// ####################################################################################################
103103

104-
void uart_interrupt_handler(uart_t* uart) {
104+
void ICACHE_RAM_ATTR uart_interrupt_handler(uart_t* uart) {
105105

106106
// -------------- UART 0 --------------
107107
uint32_t status = READ_PERI_REG(UART_INT_ST(0));

hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_noniso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ char * dtostrf(double number, signed char width, unsigned char prec, char *s) {
180180
// Extract the integer part of the number and print it
181181
unsigned long int_part = (unsigned long) number;
182182
double remainder = number - (double) int_part;
183-
out += sprintf(out, "%d", int_part);
183+
out += sprintf(out, "%ld", int_part);
184184

185185
// Print the decimal point, but only if there are digits beyond
186186
if(prec > 0) {

hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring_digital.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ volatile uint32_t* portModeRegister(uint32_t port) {
6363
enum PinFunction {
6464
GPIO, PWM
6565
};
66-
static uint32_t g_gpio_function[PINCOUNT] = { GPIO };
6766

6867
extern void __pinMode(uint8_t pin, uint8_t mode) {
6968
if(pin == 16) {

hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void ESP8266WebServer::_parseArguments(String data)
259259
Serial.print(" &@ ");
260260
Serial.println(next_arg_index);
261261
#endif
262-
if (equal_sign_index == -1 || equal_sign_index > next_arg_index && next_arg_index != -1) {
262+
if ((equal_sign_index == -1) || ((equal_sign_index > next_arg_index) && (next_arg_index != -1))) {
263263
#ifdef DEBUG
264264
Serial.print("arg missing value: ");
265265
Serial.println(iarg);

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/lwip/mem_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
4545

4646
//static unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
47-
static unsigned char *ucHeap;
47+
//static unsigned char *ucHeap;
4848

4949
typedef struct A_BLOCK_LINK
5050
{
@@ -56,16 +56,16 @@ static const unsigned short heapSTRUCT_SIZE = ( sizeof( xBlockLink ) + portBYTE_
5656

5757
//static const size_t xTotalHeapSize = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
5858

59-
static xBlockLink xStart, *pxEnd = NULL;
59+
//static xBlockLink xStart, *pxEnd = NULL;
6060

6161
//static size_t xFreeBytesRemaining = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
6262

6363

6464
/*------------------------º¯ÊýÉùÃ÷-----------------------------------*/
6565

66-
static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;
66+
//static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;
6767

68-
static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;
68+
//static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;
6969

7070
void vApplicationMallocFailedHook( void ) ;//ICACHE_FLASH_ATTR;
7171

hardware/tools/esp8266/sdk/include/c_types.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ typedef enum {
6666
#define SHMEM_ATTR
6767

6868
#ifdef ICACHE_FLASH
69-
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
70-
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
69+
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
70+
#define ICACHE_RAM_ATTR __attribute__((section(".text")))
71+
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
7172
#else
7273
#define ICACHE_FLASH_ATTR
74+
#define ICACHE_RAM_ATTR
7375
#define ICACHE_RODATA_ATTR
7476
#endif /* ICACHE_FLASH */
7577

0 commit comments

Comments
 (0)