Skip to content

Commit 9ce0f57

Browse files
xidamengambiot
authored andcommitted
Pre Release Ameba MicroPython V1.1.0 (#3)
* [Add Ameba port] Add Ameba specific port src and dependency [Update linker] Update linker to resolve RAM shortage * [Add ignored files] add archive lib and pre-built binaries * [Multiple updates] Add ameba sdk as submodule, add postbild tool src, add amebad_tool, update makefile, relocate linker script * [Update Makefile] Update makefile to be compatible with all OS when extracting embedded toolchain * [Support and API] Add support for AMB23 RTL8722DM and update peripheral APIs - Add hardware support for AMB23 RTL8722DM (Previously known as RTL8722DM_MINI) - Update peripheral API for standardization - - timer - - ADC - - PWM(WIP) - Add Flash module to the port * [Pin/GPIO] Standardize Pin module API - Add new API and constants - Fix a bug found with REPL under readline.c * [PWM] Standardize PWM module API - Add machine_pwm.c from extmod as the micropython pwm binding - Add and update API to work like RP2 port * [UART] Standardize UART module API - Add new API and removing some existing ones - Update API to comply with RP2 style * [I2C] Standardize I2C module API - Re-structure the I2C module to make use of the generic I2C MicroPython binding - Add, remove and update API with be like RP2 style * [SPI] Standardize SPI module API - Re-structure the SPI module to make use of the MicroPython generic bindings - Add, remove and update API to be like RP2 style * [Readme] Update Readme to include more details - Update README.md to include more details - minor updates to i2c and timer module API Co-authored-by: ambiot <ambiot123@gmail.com>
1 parent 7d5b000 commit 9ce0f57

File tree

105 files changed

+15127
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+15127
-55
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@
4242
[submodule "lib/pico-sdk"]
4343
path = lib/pico-sdk
4444
url = https://github.com/raspberrypi/pico-sdk.git
45+
[submodule "lib/ameba_sdk"]
46+
path = lib/ameba_sdk
47+
url = https://github.com/ambiot/ambd_micropython.git

lib/ameba_sdk

Submodule ameba_sdk added at d4ba4ba

ports/ameba/.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# These are binary so should never be modified by git.
2+
*.a binary
3+
*.mpy binary
4+
*.bz2 binary
5+
*.tar binary
6+
*.exe binary
7+
*.bin binary

ports/ameba/Makefile

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
include ../../py/mkenv.mk
2+
3+
4+
# declare before py.mk
5+
FROZEN_DIR = mp_scripts
6+
FROZEN_MPY_DIR = mp_frozenmodules
7+
8+
include $(TOP)/py/py.mk
9+
10+
OS := $(shell uname)
11+
CHIP := AMEBAD
12+
BOARD := RTL8722DM
13+
DEBUG := 1
14+
VENDOR := ../../lib/ameba_sdk/MicroPython_RTL8722/ports/rtl8722/amebad_vendor/sdk
15+
TOOL := amebad_tool/tools
16+
17+
18+
19+
$(info ## This build now supports Cygwin, Linux and MacOS)
20+
$(info ## Please specify which board you are building for, currently supported boards:)
21+
$(info )
22+
$(info * RTL8722DM)
23+
$(info * RTL8722DM_MINI)
24+
$(info )
25+
$(info ## Now building for: $(BOARD))
26+
27+
28+
# Declaring tools depending on OS
29+
# Windows Cygwin
30+
ifeq ($(findstring CYGWIN, $(OS)), CYGWIN)
31+
TC_PATH :=
32+
CROSS_COMPILE := arm-none-eabi-
33+
AR = $(TC_PATH)$(CROSS_COMPILE)ar.exe
34+
CC = $(TC_PATH)$(CROSS_COMPILE)gcc.exe
35+
AS = $(TC_PATH)$(CROSS_COMPILE)as.exe
36+
NM = $(TC_PATH)$(CROSS_COMPILE)nm.exe
37+
LD = $(TC_PATH)$(CROSS_COMPILE)gcc.exe
38+
GDB = $(TC_PATH)$(CROSS_COMPILE)gdb.exe
39+
SIZE = $(TC_PATH)$(CROSS_COMPILE)size.exe
40+
OBJCOPY = $(TC_PATH)$(CROSS_COMPILE)objcopy.exe
41+
OBJDUMP = $(TC_PATH)$(CROSS_COMPILE)objdump.exe
42+
STRIP = $(TC_PATH)$(CROSS_COMPILE)strip.exe
43+
POSTBUILD = postbuild_img2_arduino_windows.exe
44+
IMAGETOOL = amebad_image_tool.exe
45+
PICK = pick.exe
46+
PAD = pad.exe
47+
BUILDTOOL_PATH := tools/windows
48+
UPLOAD_PATH := COM8
49+
POSTBUILDTOOL_PATH := amebad_tool/tools/windows
50+
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross.exe
51+
LINKER_SCRIPT =
52+
POSTBUILD_TOOLCHAIN_PATH = cygwin
53+
else ifeq ($(findstring Linux, $(OS)), Linux)
54+
# Linux
55+
TC_PATH :=
56+
CROSS_COMPILE := arm-none-eabi-
57+
AR = $(TC_PATH)$(CROSS_COMPILE)ar
58+
CC = $(TC_PATH)$(CROSS_COMPILE)gcc
59+
AS = $(TC_PATH)$(CROSS_COMPILE)as
60+
NM = $(TC_PATH)$(CROSS_COMPILE)nm
61+
LD = $(TC_PATH)$(CROSS_COMPILE)gcc
62+
GDB = $(TC_PATH)$(CROSS_COMPILE)gdb
63+
SIZE = $(TC_PATH)$(CROSS_COMPILE)size
64+
OBJCOPY = $(TC_PATH)$(CROSS_COMPILE)objcopy
65+
OBJDUMP = $(TC_PATH)$(CROSS_COMPILE)objdump
66+
STRIP = $(TC_PATH)$(CROSS_COMPILE)strip
67+
POSTBUILD = postbuild_img2_arduino_linux
68+
IMAGETOOL = amebad_image_tool
69+
PICK = pick
70+
PAD = pad
71+
BUILDTOOL_PATH := tools/linux
72+
UPLOAD_PATH := /dev/ttyUSB0
73+
POSTBUILDTOOL_PATH := amebad_tool/tools/linux
74+
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross
75+
LINKER_SCRIPT =
76+
POSTBUILD_TOOLCHAIN_PATH = linux
77+
else
78+
# MacOS
79+
TC_PATH :=
80+
CROSS_COMPILE := arm-none-eabi-
81+
AR = $(TC_PATH)$(CROSS_COMPILE)ar
82+
CC = $(TC_PATH)$(CROSS_COMPILE)gcc
83+
AS = $(TC_PATH)$(CROSS_COMPILE)as
84+
NM = $(TC_PATH)$(CROSS_COMPILE)nm
85+
LD = $(TC_PATH)$(CROSS_COMPILE)gcc
86+
GDB = $(TC_PATH)$(CROSS_COMPILE)gdb
87+
SIZE = $(TC_PATH)$(CROSS_COMPILE)size
88+
OBJCOPY = $(TC_PATH)$(CROSS_COMPILE)objcopy
89+
OBJDUMP = $(TC_PATH)$(CROSS_COMPILE)objdump
90+
STRIP = $(TC_PATH)$(CROSS_COMPILE)strip
91+
POSTBUILD = postbuild_img2_arduino_macos
92+
IMAGETOOL = amebad_image_tool
93+
PICK = pick
94+
PAD = pad
95+
BUILDTOOL_PATH := tools/macos
96+
UPLOAD_PATH := /dev/ttyUSB0
97+
POSTBUILDTOOL_PATH := amebad_tool/tools/macos
98+
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross
99+
LINKER_SCRIPT =
100+
POSTBUILD_TOOLCHAIN_PATH = macos
101+
endif
102+
103+
include amebad.mk
104+
105+
include $(TOP)/py/mkrules.mk

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy