Skip to content

ram macro, fix warnings, #125 #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hardware/esp8266com/esp8266/cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void ets_intr_unlock();
typedef unsigned int word;

#define bit(b) (1UL << (b))
#define _BV(b) (1UL << (b))

typedef uint8_t boolean;
typedef uint8_t byte;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ UARTnr_t uart_get_debug();
// ####################################################################################################
// ####################################################################################################

void uart_interrupt_handler(uart_t* uart) {
void ICACHE_RAM_ATTR uart_interrupt_handler(uart_t* uart) {

// -------------- UART 0 --------------
uint32_t status = READ_PERI_REG(UART_INT_ST(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ char * dtostrf(double number, signed char width, unsigned char prec, char *s) {
// Extract the integer part of the number and print it
unsigned long int_part = (unsigned long) number;
double remainder = number - (double) int_part;
out += sprintf(out, "%d", int_part);
out += sprintf(out, "%ld", int_part);

// Print the decimal point, but only if there are digits beyond
if(prec > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ volatile uint32_t* portModeRegister(uint32_t port) {
enum PinFunction {
GPIO, PWM
};
static uint32_t g_gpio_function[PINCOUNT] = { GPIO };

extern void __pinMode(uint8_t pin, uint8_t mode) {
if(pin == 16) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void ESP8266WebServer::_parseArguments(String data)
Serial.print(" &@ ");
Serial.println(next_arg_index);
#endif
if (equal_sign_index == -1 || equal_sign_index > next_arg_index && next_arg_index != -1) {
if ((equal_sign_index == -1) || ((equal_sign_index > next_arg_index) && (next_arg_index != -1))) {
#ifdef DEBUG
Serial.print("arg missing value: ");
Serial.println(iarg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
//#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )

//static unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
static unsigned char *ucHeap;
//static unsigned char *ucHeap;

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

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

static xBlockLink xStart, *pxEnd = NULL;
//static xBlockLink xStart, *pxEnd = NULL;

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


/*------------------------��������-----------------------------------*/

static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;
//static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;

static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;
//static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;

void vApplicationMallocFailedHook( void ) ;//ICACHE_FLASH_ATTR;

Expand Down
6 changes: 4 additions & 2 deletions hardware/tools/esp8266/sdk/include/c_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ typedef enum {
#define SHMEM_ATTR

#ifdef ICACHE_FLASH
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#define ICACHE_RAM_ATTR __attribute__((section(".text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#else
#define ICACHE_FLASH_ATTR
#define ICACHE_RAM_ATTR
#define ICACHE_RODATA_ATTR
#endif /* ICACHE_FLASH */

Expand Down