updated readme

This commit is contained in:
Robin Müller 2020-12-30 14:34:25 +01:00
parent e216e03897
commit 8d0b87524e
3 changed files with 91 additions and 61 deletions

133
README.md
View File

@ -171,64 +171,23 @@ from machine to machine.
4. Run build command by double clicking the created target or by right clicking 4. Run build command by double clicking the created target or by right clicking
the project folder and selecting Build Project. the project folder and selecting Build Project.
## Debugging the software (when workstation is directly conncected to Q7S) ## TCF-Agent
1. Assign static IP address to Q7S 1. On reboot, some steps have to be taken on the Q7S. Set static IP address and netmask
* Open serial console of Q7S (Accessible via the micro-USB of the PIM, see also Q7S user maunal chapter 10.3)
* Baudrate 115200
* Login to Q7S:
* user: root
* pw: root
* Set IP address and netmask with
```sh ```sh
ifconfig eth0 192.168.133.10 ifconfig eth0 192.168.133.10
ifconfig eth0 netmask 255.255.255.0 ifconfig eth0 netmask 255.255.255.0
``` ```
2. Connect Q7S to workstation via ethernet 2. `tcfagent` application should run automatically but this can be checked with
3. Make sure the netmask of the ehternet interface of the workstation matches the netmask of the Q7S
* When IP address is set to 192.168.133.10 and the netmask is 255.255.255.0, an example IP address for the workstation
is 192.168.133.2
4. Run tcf-agent on Q7S
* Tcf-agent is not yet integrated in the rootfs of the Q7S. Therefore build tcf-agent manually
```sh ```sh
git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git systemctl status tcfagent
cd org.eclipse.tcf.agent/agent
make CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld MACHINE=arm NO_SSL=1 NO_UUID=1
``` ```
* Transfer executable agent from org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug to /tmp of Q7S 3. If the agent is not running, check whether `agent` is located inside `usr/bin`.
You can run it manually there. To perform auto-start on boot, have a look at the start-up
```sh application section.
cd obj/GNU/Linux/arm/Debug
scp agent root@192.168.133.10:/tmp
```
* On Q7S
```sh
cd /tmp
chmod +x agent
```
* Run agent
```sh
./agent
```
5. In Xilinx SDK 2018.2 right click on project → Debug As → Debug Configurations
6. Right click Xilinx C/C++ applicaton (System Debugger) → New →
7. Set Debug Type to Linux Application Debug and Connectin to Linux Agent
8. Click New
9. Give connection a name
10. Set Host to static IP address of Q7S. e.g. 192.168.133.10
11. Test connection (This ensures the TCF Agent is running on the Q7S)
12. Select Application tab
* Project Name: eive_obsw
* Local File Path: Path to eiveobsw-linux.elf (in _bin\linux\devel)
* Remote File Path: /tmp/eive_obsw.elf
## Debugging the software via Flatsat PC ## Debugging the software via Flatsat PC
@ -249,6 +208,9 @@ To access the console of the Q7S run the following:
picocom -b 115200 /dev/ttyUSB0 picocom -b 115200 /dev/ttyUSB0
``` ```
If the serial port is blocked for some reason, you can kill
the process using it with `q7s_kill`.
You can use `AltGr` + `X` to exit the picocom session. You can use `AltGr` + `X` to exit the picocom session.
To debug an application, first make sure a static IP address is assigned to the Q7S. Run ifconfig on the Q7S serial console. To debug an application, first make sure a static IP address is assigned to the Q7S. Run ifconfig on the Q7S serial console.
@ -278,9 +240,19 @@ Note: When now setting up a debug session in the Xilinx SDK, the host must be se
## Transfering files via SCP ## Transfering files via SCP
To transfer files from the local machine to the Q7S, use port forwarding
```sh
ssh -L 1535:192.168.133.10:22 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
```
## Launching an application after boot Then you can copy an `example` file like this
```sh
scp -P 1535 example root@localhost:/tmp
```
## Launching an application at start-up
Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds two xdi images). Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds two xdi images).
Note: It is not possible to modify the currently loaded root partition, e.g. creating directories. To do this, Note: It is not possible to modify the currently loaded root partition, e.g. creating directories. To do this,
@ -299,7 +271,8 @@ the parition needs to be mounted.
``` ```
The mounted partition will be located inside the `/tmp` folder The mounted partition will be located inside the `/tmp` folder
3. Copy the executable to /bin/usr 3. Copy the executable to `/usr/bin`
4. Make sure the permissions to execute the application are set 4. Make sure the permissions to execute the application are set
```sh ```sh
chmod +x application chmod +x application
@ -344,11 +317,13 @@ the parition needs to be mounted.
More detailed information about the used q7s commands can be found in the Q7S user manual. More detailed information about the used q7s commands can be found in the Q7S user manual.
### Bringing up CAN ### Bringing up CAN
````
```sh
ip link set can0 down ip link set can0 down
ip link set can0 type can loopback off ip link set can0 type can loopback off
ip link set can0 up type can bitrate 1000000 ip link set can0 up type can bitrate 1000000
```` ```
Following command sends 8 bytes to device with id 99 (for petalinux) Following command sends 8 bytes to device with id 99 (for petalinux)
```` ````
cansend can0 -i99 99 88 77 11 33 11 22 99 cansend can0 -i99 99 88 77 11 33 11 22 99
@ -470,3 +445,57 @@ p60-dock # param get out_en[0]
GET out_en[0] = 1 GET out_en[0] = 1
```` ````
## Debugging the software (when workstation is directly conncected to Q7S)
1. Assign static IP address to Q7S
* Open serial console of Q7S (Accessible via the micro-USB of the PIM, see also Q7S user maunal chapter 10.3)
* Baudrate 115200
* Login to Q7S:
* user: root
* pw: root
2. Connect Q7S to workstation via ethernet
3. Make sure the netmask of the ehternet interface of the workstation matches the netmask of the Q7S
* When IP address is set to 192.168.133.10 and the netmask is 255.255.255.0, an example IP address for the workstation
is 192.168.133.2
4. Run tcf-agent on Q7S
* Tcf-agent is not yet integrated in the rootfs of the Q7S. Therefore build tcf-agent manually
```sh
git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
cd org.eclipse.tcf.agent/agent
make CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld MACHINE=arm NO_SSL=1 NO_UUID=1
```
* Transfer executable agent from org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug to /tmp of Q7S
```sh
cd obj/GNU/Linux/arm/Debug
scp agent root@192.168.133.10:/tmp
```
* On Q7S
```sh
cd /tmp
chmod +x agent
```
* Run agent
```sh
./agent
```
5. In Xilinx SDK 2018.2 right click on project → Debug As → Debug Configurations
6. Right click Xilinx C/C++ applicaton (System Debugger) → New →
7. Set Debug Type to Linux Application Debug and Connectin to Linux Agent
8. Click New
9. Give connection a name
10. Set Host to static IP address of Q7S. e.g. 192.168.133.10
11. Test connection (This ensures the TCF Agent is running on the Q7S)
12. Select Application tab
* Project Name: eive_obsw
* Local File Path: Path to eiveobsw-linux.elf (in _bin\linux\devel)
* Remote File Path: /tmp/eive_obsw.elf

View File

@ -43,7 +43,7 @@ void InitMission::initTasks(){
/* TMTC Distribution */ /* TMTC Distribution */
PeriodicTaskIF* TmTcDistributor = TaskFactory::instance()-> PeriodicTaskIF* TmTcDistributor = TaskFactory::instance()->
createPeriodicTask("DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, createPeriodicTask("DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE,
0.100, nullptr); 0.2, nullptr);
ReturnValue_t result = TmTcDistributor->addComponent( ReturnValue_t result = TmTcDistributor->addComponent(
objects::CCSDS_PACKET_DISTRIBUTOR); objects::CCSDS_PACKET_DISTRIBUTOR);
if(result!=HasReturnvaluesIF::RETURN_OK){ if(result!=HasReturnvaluesIF::RETURN_OK){
@ -169,6 +169,7 @@ void InitMission::initTasks(){
PusMedPrio->startTask(); PusMedPrio->startTask();
PusLowPrio->startTask(); PusLowPrio->startTask();
// P60DockTask->startTask(); // P60DockTask->startTask();
#if OBSW_ADD_TEST_CODE == 1 #if OBSW_ADD_TEST_CODE == 1

View File

@ -142,7 +142,7 @@ csp_iface_t * csp_can_socketcan_init(const char * ifc, int bitrate, int promisc)
struct sockaddr_can addr; struct sockaddr_can addr;
pthread_t rx_thread; pthread_t rx_thread;
printf("Init can interface %s\n", ifc); printf("-I-: Initiating CAN interface %s\n", ifc);
#ifdef CSP_HAVE_LIBSOCKETCAN #ifdef CSP_HAVE_LIBSOCKETCAN
/* Set interface up */ /* Set interface up */