Skip to content

Commit

Permalink
add example IOC instance and debug launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 11, 2024
1 parent 4b813fd commit 92287db
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Generic IOC debugging launcher
// To use this l
// 1. make sure you have gdb installed in your container with
// apt update; apt-get install gdb
// 2. run the IOC once to make sure rutime assets are generated:
// cd /epics/ioc; make
// ./start.sh
// 3. stop the IOC with 'exit'
// 4. In vscode go to the support source in /epics/support/xxx
// 5. Set any breakpoints in the source code that you require.
// 6. You may want to set 'HOST_OPT=NO' in CONFIG_SITE and rebuild the support
// 6. Go to the debug tab and select 'IOC devcontainer debug' from the
// RUN AND DEBUG dropdown
{
"version": "0.2.0",
"configurations": [
{
"name": "IOC devcontainer debug",
"type": "cppdbg",
"request": "launch",
"program": "/epics/ioc/bin/linux-x86_64/ioc",
"args": [
"/epics/runtime/st.cmd"
],
"stopAtEntry": false,
"cwd": "/epics/ioc",
"environment": [
{
"name": "RUNTIME_DIR",
"value": "/epics/runtime"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
71 changes: 71 additions & 0 deletions services/bl01t-mo-ioc-01/config/ioc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-pmac/releases/download/2024.1.2/ibek.ioc.schema.json
ioc_name: bl01t-mo-ioc-01

description: |
Test IOC instance for pmac generic IOC.
Connects to the test pmac clipper under giles' desk
entities:
- type: epics.EpicsEnvSet
name: EPICS_TZ
value: "GMT0BST"

- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"

- type: pmac.pmacAsynIPPort
IP: 172.23.240.97:1025
name: BRICK1port

- type: pmac.GeoBrick
IdlePoll: 1000
NAXES: 4
P: BL47P-MO-BRICK-01
name: BRICK1
pmacAsynPort: BRICK1port

- type: pmac.dls_pmac_asyn_motor
is_cs: false
ACCL: 0.1
ADDR: 1
Controller: BRICK1
DESC: Motor 1
DHLM: 25
DLLM: -25
EGU: mm
M: :MOTOR1
MRES: -0.01
P: BL01T-MO-BRICK-01
VELO: 4

- type: pmac.dls_pmac_asyn_motor
is_cs: false
ACCL: 0.1
ADDR: 2
Controller: BRICK1
DESC: Motor 1
DHLM: 25
DLLM: -25
EGU: mm
M: :MOTOR2
MRES: -0.01
P: BL01T-MO-BRICK-01
VELO: 4

# test clipper has 3 coordinate systems configured and pmac will segfault at
# present if these are not configured.
- type: pmac.CS
CS: 1
IdlePoll: 1000
PmacController: BRICK1
name: CS2
- type: pmac.CS
CS: 2
IdlePoll: 1000
PmacController: BRICK1
name: CS1
- type: pmac.CS
CS: 3
IdlePoll: 1000
PmacController: BRICK1
name: CS3

0 comments on commit 92287db

Please sign in to comment.