Changes for FreeRTOS/LwIP Port for the ESP32 (ESP-IDF) (#15250)
* Changes for FreeRTOS/LwIP Port for the ESP32 (ESP-IDF) Adding FreeRTOS/LwIP to compiler: * adding freertos option * dyncalls for freertos * add freertos to posix os list * adding lwip option Setting up networking FreeRTOS/LwIP Port: * setting up lwip network for freertos * fixing posix / networking for freertos * disable setInheritable for freerots * using lwip for net control items * Fix builds by ignoring lib/posix/posix_freertos_consts.nim similar to lib/posix/posix_other_consts.nim
This commit is contained in:
parent
b5424b826e
commit
a76ae8f795
11 changed files with 589 additions and 32 deletions
|
|
@ -312,7 +312,7 @@ proc selectInto*[T](s: Selector[T], timeout: int,
|
|||
verifySelectParams(timeout)
|
||||
|
||||
if timeout != -1:
|
||||
when defined(genode):
|
||||
when defined(genode) or defined(freertos):
|
||||
tv.tv_sec = Time(timeout div 1_000)
|
||||
else:
|
||||
tv.tv_sec = timeout.int32 div 1_000
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET,
|
|||
let socketPort = if sockType == SOCK_RAW: "" else: $port
|
||||
var gaiResult = getaddrinfo(address, socketPort, addr(hints), result)
|
||||
if gaiResult != 0'i32:
|
||||
when useWinVersion:
|
||||
when useWinVersion or defined(freertos):
|
||||
raiseOSError(osLastError())
|
||||
else:
|
||||
raiseOSError(osLastError(), $gai_strerror(gaiResult))
|
||||
|
|
|
|||
|
|
@ -332,5 +332,7 @@ else:
|
|||
include ioselects/ioselectors_select # TODO: use the native VFS layer
|
||||
elif defined(nintendoswitch):
|
||||
include ioselects/ioselectors_select
|
||||
elif defined(freertos) or defined(lwip):
|
||||
include ioselects/ioselectors_select
|
||||
else:
|
||||
include ioselects/ioselectors_poll
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue