-
Notifications
You must be signed in to change notification settings - Fork 38
Internal
Minkyu Lee edited this page Oct 14, 2018
·
6 revisions
Kameleon has a layered architecture like below:
+----------------------------------+
| Builtin JS Modules | # event, i2c, pwm, spi, uart, ... (src/modules/*)
+----------------------------------+
| Core Runtime | # Event I/O, JavaScript Engine, REPL, ... (src/*.c)
+----------------------------------+
| Hardware Neutral Interface | # system.h, gpio.h, uart.h, ... (include/port/*.h)
+----------------------------------+
| Hardware Specific Implementation | # system.c, gpio.c, uart.c, ... (targets/boards/*)
+----------------------------------+
+ deps # Dependencies
+ include # C Headers
+ port # Hardware neutral interfaces
+ src # C Implementations
+ gen # Generated source files (DOT NOT EDIT)
+ modules # JavaScript native modules
+ <module>
+ targets # Hardware specific implementations
+ boards # Specific hardware boards
+ <target>
+ shared # Libraries shared by hardware targets
+ drivers # Hardware specific drivers
+ middlewares # Middlewares
+ tools # Build tools
To port to a new hardware, HNI (Hardware neutral interfaces - /include/port/*.h
) should be implemented.
- Create a folder in
targets/boards
(e.g.esp32
). - Implement all header files in
include/port/*.h
. - Create a makefile
Make.def
. - Place driver libraries in
targets/drivers
if needed.
src/main.c
is the entry point.