Skip to content

Conversation

trygvis
Copy link
Contributor

@trygvis trygvis commented May 20, 2018

fix(esp8266): Adding includes for missing symbols.
Removing unused variables.
Use GCC's packing attribute when using GCC. Skip unsupported packing pragmas if
not using GCC.
Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on
ets_printf so GCC will check the syntax of the formatting string and types of
the arguments.

fix(freertos): Define functions that are useful.
Use correct printf symbols when printing.

fix(mqtt): xTicksToWait is unsigned, can't check for less than zero. Remove
unused variables.

fix(newlib): _free_r() returns void, not void *.

fix(ssl): Make sure functions always return a value.

@CLAassistant
Copy link

CLAassistant commented May 20, 2018

CLA assistant check
All committers have signed the CLA.

fix(esp8266): Adding includes for missing symbols.
Removing unused variables.
Use GCC's packing attribute when using GCC. Skip unsupported packing pragmas if
not using GCC.
Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on
ets_printf so GCC will check the syntax of the formatting string and types of
the arguments.

fix(freertos): Define functions that are useful.
Use correct printf symbols when printing.

fix(mqtt): `xTicksToWait` is unsigned, can't check for less than zero. Remove
unused variables.

fix(newlib): `_free_r()` returns `void`, not `void *`.

fix(ssl): Make sure functions always return a value.
@trygvis
Copy link
Contributor Author

trygvis commented May 21, 2018

@wujiangang I just rebased this on top of master.

os_printf("SWReq:%d\n", SWReq);
os_printf("ShowCritical:%lu\n", uxCriticalNesting);
os_printf("HdlMacSig:%c\n", HdlMacSig);
os_printf("SWReq:%c\n", SWReq);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both HdlMacSig and SWReq are used as boolean values (either 0 or 1), even though a char is used to store it, there is no point in print it as character.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, define HdlMacSig & SWReq as uint8_t is also OK.

@@ -237,17 +242,17 @@ void IRAM_ATTR vPortExitCritical(void)
}
}
} else {
ets_printf("E:C:%d\n", uxCriticalNesting);
ets_printf("E:C:%lu\n", uxCriticalNesting);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware that the printf function in the rom does not seem to support the 'l' prefix and this print would not work as expected. Casting uxCriticalNesting to unsigned and using "%u" would work for both the rom version and the newlib version of printf.

fix(freertos): Changing types of `HdlMacSig` and `SwReq` to `uint8_t`,
they're only used as booleans.  Change uxCriticalNesting to `unsigned int`
instead of `portBASE_TYPE`, should be big enough for counting nesting
and ets_printf can't properly unsigned long values.
@trygvis
Copy link
Contributor Author

trygvis commented May 22, 2018

@FlavioBayer @27-301 Thanks for the feedback!

I've changed HdlMacSig and SWReq to uint8_t, and uxCriticalNesting to a normal unsigned int.

@trygvis trygvis mentioned this pull request May 22, 2018
wujiangang pushed a commit that referenced this pull request May 23, 2018
- fix(esp8266):
  - Adding includes for missing symbols.
  - Removing unused variables.
  - Skip unsupported packing pragmas.
  - Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on
ets_printf so GCC will check the syntax of the formatting string and types of
the arguments.
  - Add ETS_GPIO_INTR_EN(DIS)ABLE macro.
  - Use gpio_output_conf instead of gpio_output_set.

- fix(freertos):
  - Define functions that are useful.
  - Use correct printf symbols when printing.

- fix(lwip):
  - Ignore the warning in sntp.

- fix(mqtt):
  - `xTicksToWait` is unsigned, can't check for less than zero. Remove
unused variables.

- fix(newlib):
  - `_free_r()` returns `void`, not `void *`.
  - Adding includes for missing symbols.

- fix(ssl):
  - Make sure functions always return a value.

Merges #188
@wujiangang
Copy link
Contributor

@trygvis merged, some minor modifications from original PR.

@wujiangang wujiangang closed this May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants