SpaceWire BL1 (Boot Loader level 1)
bl1 spacewire packets generation.
Validate the configuration file
sudo apt install nodejs npm install pajv node_modules/.bin/pajv -s configs/<script_name>.schema.json -d configs/<script_name>.yml
Using ngultra_bl1_programmer.py
The script is used to generate the spacewire packets used by the BL1 to load one and only one bitstream and one or more applications.
Loading one bitstream and one application
bl1_spw.yml:
bitstream: type: bsm path: ./switch_blink_v2.nxb transfer_addr: 0x3100000 item_id: 0xcafecafe application_software: asw: type: asw launched: True path: ./test_led.bin load_addr: 0x3000000 start_addr: 0x3000000 item_id: 0x12345678 param1: 0x11111111 param2: 0x22222222 param3: 0x33333333
Loading one bitstream and several applications
bl1_spw_multi_asw.yml:
bitstream: type: bsm path: ./switch_blink_v2.nxb transfer_addr: 0x3100000 item_id: 0xcafecafe application_software: xcf: type: asw path: ./xng/xre-examples/hello_world/hello_world.xcf.aarch32-pmsa-fv.bin load_addr: 0x80100000 start_addr: 0x80100000 item_id: 0x22222222 param1: 0x0 param2: 0x0 param3: 0x0 xre: type: asw path: ./xng/xre-examples/hello_world/hello_world.aarch32-pmsa-fv.bin load_addr: 0x80180000 start_addr: 0x80180000 item_id: 0x33333333 param1: 0x0 param2: 0x0 param3: 0x0 xng: type: asw launched: True path: ./xng/lib/xng.aarch32-pmsa-fv.bin load_addr: 0x80000000 start_addr: 0x80000000 item_id: 0x11111111 param1: 0x80100000 param2: 0x0 param3: 0x0
Note:
-
Only one application among those copied can be launched by BL1.
-
To indicate the application to be launched by BL1, the property launched must be set to True.
-
The launched application must be the last in the configuration file. All application after the one with the property launched set to true will be ignored.
Command:
ngultra_bl1_programmer.py -s -c <configuration_file>
-
“-s” option specify to generate spacewire packets.
-
- “-o” option could be used to specify another directory where to copy the generated packets.
-
The default directory is /tmp/bl1_spacewire_packets. Note: An absolute path must be provided.
-
“-v” option increase the verbosity, useful to debug.
Note:
-
A file named packets.list containing all the generated packets is created in the same directory as the packets.
A complete documentation of the configuration file may be found at bl1_spw.schema.json
Once BL1 spacewire packets has been generated, they can be sent to the Ng-Ultra board via the spacewire link.
© NanoXplore 2022