Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
9a7a2c4d
Commit
9a7a2c4d
authored
Apr 30, 2016
by
Johny Mattsson
Browse files
Merge pull request #1184 from devsaurus/user-gnu11
Enable -std=gnu11 for user dir
parents
8dbbe40f
8e11e895
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/include/rom.h
View file @
9a7a2c4d
...
...
@@ -147,4 +147,7 @@ void srand(unsigned int);
void
uart_div_modify
(
int
no
,
unsigned
int
freq
);
/* Returns 0 on success, 1 on failure */
uint8_t
SPIRead
(
uint32_t
src_addr
,
uint32_t
*
des_addr
,
uint32_t
size
);
#endif
app/user/Makefile
View file @
9a7a2c4d
...
...
@@ -15,6 +15,7 @@ ifndef PDIR
GEN_LIBS
=
libuser.a
endif
STD_CFLAGS
=
-std
=
gnu11
-Wimplicit
#############################################################
# Configuration i.e. compile options etc.
...
...
app/user/user_exceptions.h
View file @
9a7a2c4d
...
...
@@ -3,3 +3,4 @@
#include <xtensa/corebits.h>
void
load_non_32_wide_handler
(
struct
exception_frame
*
ef
,
uint32_t
cause
)
TEXT_SECTION_ATTR
;
void
__real__xtos_set_exception_handler
(
uint32_t
cause
,
exception_handler_fn
fn
);
app/user/user_main.c
View file @
9a7a2c4d
...
...
@@ -13,6 +13,7 @@
#include "c_string.h"
#include "c_stdlib.h"
#include "flash_fs.h"
#include "flash_api.h"
#include "user_interface.h"
#include "user_exceptions.h"
#include "user_modules.h"
...
...
@@ -69,7 +70,7 @@ void TEXT_SECTION_ATTR user_start_trampoline (void)
* terse and not as readable as one might like.
*/
SPIFlashInfo
sfi
;
SPIRead
(
0
,
&
sfi
,
sizeof
(
sfi
));
// Cache read not enabled yet, safe to use
SPIRead
(
0
,
(
uint32_t
*
)(
&
sfi
)
,
sizeof
(
sfi
));
// Cache read not enabled yet, safe to use
if
(
sfi
.
size
<
2
)
// Compensate for out-of-order 4mbit vs 2mbit values
sfi
.
size
^=
1
;
uint32_t
flash_end_addr
=
(
256
*
1024
)
<<
sfi
.
size
;
...
...
sdk-overrides/include/osapi.h
View file @
9a7a2c4d
...
...
@@ -12,6 +12,8 @@ unsigned int uart_baudrate_detect(unsigned int uart_no, unsigned int async);
void
NmiTimSetFunc
(
void
(
*
func
)(
void
));
void
call_user_start
(
void
);
#include_next "osapi.h"
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment