milkv-duo / duo-8051 Goto Github PK
View Code? Open in Web Editor NEWDuo 8051 core
Duo 8051 core
https://milkv.io/docs/duo/getting-started/8051core instructions do not work
In the guide it says to download firmware.zip
. In that file there is a pre-compiled version of 8051_up
. But that one doesn't work. You have to compile it yourself using the SDK which can be found here. The code for 8051_up is located in duo-8051/tools/8051_up/
of the duo-8051 github (i.e. this repository).
The guide says to Copy 8051_up, mars_mcu_fw.bin, and blink.sh into /mnt/data, and grant execution and read permissions
but you also need to copy the file '8051_boot_cfg.ini' which can be found in the file firmware.zip
.
In the file 8051_up.c
mentioned above, is the line #define MCU_FW_PATH "/lib/firmware/mars_mcu_fw.bin"
. This means that the 8051_up
expects your executable to be located in the directory /lib/firmware/
instead of /mnt/data/
. So, you can either create that directory and place your executable there, or change the line in 8051_up.c
and recompile.
The base_project of this repository should toggle the blue led on the board when using blink.sh
from firmware.zip
. It doesn't for the Duo 256M. The problem is the GPIO numbering and memory address to be used in code. The solution was to add the line #define GPIO4_BASE 0x05021000
in the file cvi_gpio.h
of the base_project. And in the file main.c
the lines at case 0x6:
and case 0x7
should be changed into:
case 0x6: /* gpio_high */
set_gpio_direction(GPIO4_BASE,2,GPIO_DIRECTION_OUT);
set_gpio_level(GPIO4_BASE,2,GPIO_LEVEL_HIGH);
mmio_write_32(RTC_INFO1, 0xff);
printf("LED_GPIO->HIGH\n");
break;
case 0x7: /* gpio_low */
set_gpio_direction(GPIO4_BASE,2,GPIO_DIRECTION_OUT);
set_gpio_level(GPIO4_BASE,2,GPIO_LEVEL_LOW);
mmio_write_32(RTC_INFO1, 0xff);
printf("LED_GPIO->LOW\n");
break;
Note the use of GPIO4_BASE
and pin number 2
. Also note that the name 'GPIO4' is probably technically not correct, but it doesn't really matter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.