Giter Club home page Giter Club logo

duo-8051's Introduction

duo-8051's People

Contributors

rjgawuie avatar carbonfix avatar

Stargazers

 avatar TurBoss avatar Jevin Sweval avatar

Watchers

Jevin Sweval avatar James Cloos avatar Yixun Lan avatar  avatar

Forkers

lign17314 svoovzi

duo-8051's Issues

Some issues for the Duo 256M

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.