Commit Graph

25 Commits

Author SHA1 Message Date
Jeff Epler 6c3cdceb45
Implement scan, connect, ping
My pings go out, and then they come back

```py
import os
import wifi
import ipaddress

wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
```
2022-09-28 10:06:33 -05:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Scott Shawcroft 09f7b43c64
Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Jeff Epler ebf0fe0a8c mpy-cross: Make it easier to build mpy-cross static targets 2020-01-25 14:04:11 -06:00
Scott Shawcroft d6b2199f36
Stub out safe mode for mpy-cross 2019-03-12 11:18:30 -07:00
Scott Shawcroft df6c8eaed7
Add stack.c stub for mpy-cross 2018-12-06 15:29:26 -08:00
Paul Sokolovsky ab78fe0eb9 mpy-cross/Makefile: Also undefine MICROPY_FORCE_32BIT and CROSS_COMPILE.
mpy-cross is a host, not target binary. It should not be build with the
target compiler, compiler options and other settings. For example,

If someone currently tries to build from pristine checkout the unix port
with the following command:

    make CROSS_COMPILE=arm-linux-gnueabihf-

then mpy-cross will be built with arm-linux-gnueabihf-gcc and of course
won't run on the host, leading to overall build failure.

This situation was worked around for some options in 1d8c3f4cff, so add
MICROPY_FORCE_32BIT and CROSS_COMPILE to that set too.
2018-08-14 17:20:18 +10:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Dan Halbert d305e7d6cf handle errno defns for mingw and use correct executable name 2018-07-10 22:29:36 -04:00
Dan Halbert 85d5d321e2 Add STATIC_BUILD make flag for mpy-cross to build a static executable 2018-07-10 10:38:32 -04:00
Damien George ee40d1704f mpy-cross: Make build independent of extmod directory.
mpy-cross doesn't depend on any code in the extmod directory so completely
exclude it from the build (extmod may still be scanned for qstrs but that
is controlled by py/py.mk).  This speeds up the build a little, and
improves abstraction of this component.

Also, make -I$(BUILD) take precedence over -I$(TOP) in case there are stray
files in the root directory that would be picked up.
2018-07-10 14:11:28 +10:00
Damien George 4a93801c12 all: Update Makefiles and others to build with new ports/ dir layout.
Also renames "stmhal" to "stm32" in documentation and everywhere else.
2017-09-06 14:09:13 +10:00
Damien George 7d4a2f773c all: Make use of $(TOP) variable in Makefiles, instead of "..".
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top
level of this repository.
2017-08-11 12:22:19 +10:00
Alexander Steffen 55f33240f3 all: Use the name MicroPython consistently in comments
There were several different spellings of MicroPython present in comments,
when there should be only one.
2017-07-31 18:35:40 +10:00
Damien George 761e4c7ff6 all: Remove trailing spaces, per coding conventions. 2017-07-19 13:12:10 +10:00
Damien George ed6d2547df mpy-cross/Makefile: Guard "override undefine" by test for make feature.
make v3.81 doesn't have "undefine" so we can't use it with that version.
2017-05-26 13:16:55 +10:00
Damien George 1d8c3f4cff mpy-cross/Makefile: Override undefine any inherited variables.
This is a temporary hack to allow othe Makefiles to build mpy-cross
recursively.
2017-05-11 23:40:16 +10:00
stijn 5b57ae985f mpy-cross: Fix compiler detection for including windows/fmode.c
fmode.c should only be included for builds targetting 'pure' windows, i.e.
msvc or mingw builds but not when using msys or cygwin's gcc (see #2298).
Just checking if the OS is windows and UNAME doesn't have msys stil leaves
the gate open for builds with cygwin's gcc since UNAME there is e.g.
CYGWIN_NT-6.1-WOW.
Fix this by checking for 'mingw' explicitly in the compiler version; both
gcc and clang have the -dumpmachine flag so the check should be ok for
all platforms.
2017-05-03 10:37:51 +10:00
Krzysztof Blazewicz 75589272ef all/Makefile: Remove -ansi from GCC flags, its ignored anyway.
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90.
Because it goes right before -std=gnu99 it is ignored as for conflicting flags
GCC always uses the last one.
2017-03-23 15:32:12 +11:00
stijn 37b143ce9e mpy-cross: Fix mingw and msys2 compilation
When compiling with msys2's gcc there's no need to apply the binary fmode
so adjust the Makefile to reflect that.
When compiling with mingw we need to include malloc.h since there is no
alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.
2016-07-30 21:15:45 +03:00
stijn 9bdb82ef6b mpy-cross: Use binary file translation mode for creating mpy files on windows
This is a fix for https://github.com/micropython/micropython/issues/2209:
by default a file created using open() uses text translation mode so writing
\n to it will result in the file having \r\n. This is obviously problematic
for binary .mpy files, so provide functions for setting the open mode
and use binary mode in mpy-cross' main().
2016-07-22 21:21:54 +03:00
Anton Sokolchenko e9f3fb7662 mpy-cross: Fix Makefile to handle gc-sections linker flags on OS X. 2016-07-11 12:12:07 +01:00
Damien George 853fb08d0d mpy-cross: Remove setting of MICROPY_FORCE_32BIT=1 from Makefile.
Building in 32-bit mode was only to reduce binary size on 64-bit machines
and is otherwise not needed.  Having it forced to 32-bit meant an
unnecessary dependency on 32-bit libraries that is now removed.
2016-03-09 15:56:11 +00:00
Damien George 56f76b873a mpy-cross: Add new component, a cross compiler for MicroPython bytecode.
This component allows to generate .mpy files (pre compiled bytecode)
which can be executed within any MicroPython runtime/VM.
2016-02-25 10:12:21 +00:00