Giter Club home page Giter Club logo

plus1_bchip-non-os's Introduction

Nonos boot form OPENAMP and open VirtualIO in default.

1.How to boot nonos:
	make all

  When you entry linux console, enter commands:
  (Follow command has been added in linux/rootfs/initramfs/disk_base/etc/init.d/rcS at present)

	echo rom > /sys/class/remoteproc/remoteproc0/firmware 
	echo start > /sys/class/remoteproc/remoteproc0/state 

2.DEBUG
If you want to debug nonos.
  1)Can add printf directly (UART0 output).

  2)If use the HW UART2 (UARTX in same way) in variant.h
  #define SERIAL_UART_INSTANCE    2

If you want to debug nonos by boot from xboot.

  1)Set DEBUG_NONOS = 1 in Makefile (line. 10).

  2)put binary in romter, spi_all.bin in nonos/Bchip-non-os/bin


3.if you want to use a device(defalut none of the device is in use)
  1) set in variants/sp7021_evb/variant.h

  .. code-block:: c
	/* select spi.(SPI0-SPI4) */
	//#define SPI_SEL_INSTANCE      1
	/* select i2c.(I2C0-I2C3) */
	//#define I2C_SEL_INSTANCE      1

  NOTE:if run linux and nonos at same time. please notice the conflict device.
	Here offer the script check conflict device.
	when you 'make nonos' in project root. Print info as follow:

		xt.hu@cdoa16 ~/new_code> make nonos
		make[1]: Entering directory '/home/xt.hu/new_code/nonos/Bchip-non-os'
		[nonos check]info: no conflict dev. is OK!
		make[1]: Leaving directory '/home/xt.hu/new_code/nonos/Bchip-non-os'

	if confilct dev exist:

		xt.hu@cdoa16 ~/new_code [SIGINT]> make nonos
		make[1]: Entering directory '/home/xt.hu/new_code/nonos/Bchip-non-os'
		--------------------------------------------------------------
		[nonos check] WARNING: Devices that conflicts with Linux:
		spi_controller1
		Devices can't normally work.Please select other similar device
		--------------------------------------------------------------
		Makefile:141: recipe for target 'check' failed
		make[1]: *** [check] Error 1
		make[1]: Leaving directory '/home/xt.hu/new_code/nonos/Bchip-non-os'
		build/Makefile:259: recipe for target 'nonos' failed
		make: *** [nonos] Error 2

  2) complie the example in Makefile

     nonos/Bchip-non-os/Makefile(line. 110)
	# Arduino C++ Example
	DIRS += $(TOPDIR)/libraries/examples
	#DIRS += $(TOPDIR)/libraries/examples/timer
	#DIRS += $(TOPDIR)/libraries/examples/i2c
	#DIRS += $(TOPDIR)/libraries/examples/exti
	#DIRS += $(TOPDIR)/libraries/examples/VirtIOSerial
	#DIRS += $(TOPDIR)/libraries/examples/uart

     refer to:
	libraries/examples

	notice:Only one example can be compiled at a time.
	In fact the example just implements the function setup() and loop().

	framework in nonos/Bchip-non-os/cores/arduino/main.cpp:

	.. code-block:: c
		int main(void)
		{
			initVariant();

			setup();

			for (;;) {
			#if defined(CORE_CALLBACK)
				CoreCallback();
			#endif
				loop();
				serialEventRun();
			}
			return 0;
		}

plus1_bchip-non-os's People

Contributors

dmitrydvorkin avatar sunplus-plus1 avatar lhkuo avatar

Watchers

James Cloos avatar

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.