-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Revise system headers / enforce c11 #1695
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
366d489
Build `C` files within modules to c11 standard (previously defaulted …
mikee47 e68dafb
Standardise data types
mikee47 bc63148
Move `espinc\c_types_compatible.h` -> `c_types.h`
mikee47 f733c39
Simplify and tidy Esp8266 system headers
mikee47 c7164f9
Fix samples - use <esp_systemapi.h> to ensure correct c_types.h gets …
mikee47 41d2236
Move attribute definitions and macros out of ctypes.h
mikee47 30d84dc
Add `WEAK_ATTR` macro to allow selective weak symbol support
mikee47 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2010 - 2011 Espressif System | ||
* | ||
*/ | ||
|
||
// Overrides c_types.h for all SDK versions | ||
|
||
#ifndef _C_TYPES_H_ | ||
#define _C_TYPES_H_ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include <stdbool.h> | ||
|
||
#define BOOL bool | ||
#define TRUE true | ||
#define FALSE false | ||
|
||
typedef uint8_t uint8; | ||
typedef uint8_t u8; | ||
typedef int8_t sint8; | ||
typedef int8_t int8; | ||
typedef int8_t s8; | ||
typedef uint16_t uint16; | ||
typedef uint16_t u16; | ||
typedef int16_t sint16; | ||
typedef int16_t s16; | ||
typedef uint32_t uint32; | ||
typedef unsigned int u_int; | ||
typedef uint32_t u32; | ||
typedef int32_t sint32; | ||
typedef int32_t s32; | ||
typedef int32_t int32; | ||
typedef int64_t sint64; | ||
typedef uint64_t uint64; | ||
typedef uint64_t u64; | ||
typedef float real32; | ||
typedef double real64; | ||
|
||
#endif /* _C_TYPES_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ESP8266 attribute definitions (previously in c_types.h) | ||
#pragma once | ||
|
||
#define IRAM_ATTR __attribute__((section(".iram.text"))) | ||
#define STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed)) | ||
#define STORE_ATTR __attribute__((aligned(4))) | ||
|
||
#define DMEM_ATTR __attribute__((section(".bss"))) | ||
#define SHMEM_ATTR | ||
|
||
#ifdef ICACHE_FLASH | ||
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text"))) | ||
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"))) | ||
#else | ||
#define ICACHE_FLASH_ATTR | ||
#define ICACHE_RODATA_ATTR | ||
#endif | ||
|
||
#define STORE_ATTR __attribute__((aligned(4))) | ||
|
||
#ifdef ENABLE_GDB | ||
#define GDB_IRAM_ATTR IRAM_ATTR | ||
#else | ||
#define GDB_IRAM_ATTR | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 0 additions & 101 deletions
101
Sming/Arch/Esp8266/Components/esp8266/include/espinc/c_types_compatible.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifndef SDK_INTERNAL | ||
|
||
// Missing from early SDK versions | ||
extern void *pvPortMalloc(size_t xWantedSize, const char *file, uint32 line); | ||
extern void *pvPortZalloc(size_t xWantedSize, const char *file, uint32 line); | ||
extern void pvPortFree(void *ptr); | ||
extern void vPortFree(void *ptr, const char *file, uint32 line); | ||
extern void *vPortMalloc(size_t xWantedSize); | ||
|
||
#endif | ||
|
||
#include_next <mem.h> | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR
make dist-clean
did not clean the axtls directory and the new patch was not applied cleanly. Any idea why is that happening?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try
make dist-clean ENABLE_SSL=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have these optional custom libraries which get built:
Behaviour is that the library only gets cleaned if the relevant flags are defined, ditto for submodule updating. It would be better of course if they all got cleaned regardless. I can look at this in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. It will also match the current default behaviour.