generated from epics-containers/ioc-pmac
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
719 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY | ||
_commit: 3.4.0b5 | ||
_src_path: gh:epics-containers/ioc-template | ||
description: Generic IOC for simulation motors | ||
git_platform: github.com | ||
github_org: epics-containers | ||
name: ioc-motorsim | ||
repo_uri: git@github.com:epics-containers/ioc-motorsim.git | ||
rtems: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# make sure all the files we mount into the container exist | ||
for i in \ | ||
.bash_eternal_history \ | ||
.bashrc_dev_container \ | ||
.bashprofile_dev_container \ | ||
.inputrc | ||
do | ||
if [ ! -f $HOME/$i ] ; then | ||
touch $HOME/$i; | ||
fi | ||
done | ||
# custom initialization goes here - runs outside of the dev container | ||
# just before the container is launched but after the container is created | ||
|
||
echo "devcontainerID ${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Custom initialization goes here if needed. | ||
# Runs inside the dev container after the container is created | ||
|
||
################################################################################ | ||
# When using docker we will not be root inside the container | ||
# the following steps are then required | ||
################################################################################ | ||
|
||
if [[ $USER != "root" ]] ; then | ||
# make sure the non-root user can build iocs and (mounted in) support modules | ||
sudo chown -R ${USER}:${USER} /epics/links /venv | ||
sudo chown -h ${USER}:${USER} /epics /epics/ioc | ||
|
||
# also give non-root user access to the same bash config we use in podman | ||
sudo chmod a+rx /root | ||
for f in .inputrc .bash_eternal_history .bashrc .bashrc_dev_container; do | ||
sudo chmod a+rw /root/$f | ||
ln -sf /root/$f $HOME/$f | ||
done | ||
sudo chown -R ${USER}:${USER} /epics/ibek-defs /epics/pvi-defs /epics/support/configure /venv | ||
sudo chown -h ${USER}:${USER} /epics /epics/ioc /epics/support | ||
fi | ||
|
||
################################################################################ | ||
# Custom install script for each developer to add whatever they like to | ||
# all epics-containers devcontainers | ||
# Shell customizations for Generic IOC devcontainers | ||
################################################################################ | ||
|
||
# add ibek completion to bash and zsh | ||
echo 'source <(ibek --show-completion bash)' >> $HOME/.bashrc | ||
echo 'source <(ibek --show-completion zsh)' >> $HOME/.zshrc | ||
|
||
# pick a theme that does not cause completion corruption in zsh | ||
sed -i $HOME/.zshrc -e 's/ZSH_THEME="devcontainers"/ZSH_THEME="dst"/' | ||
|
||
# add user's custom profile container creation script | ||
if [ -f ~/.bashprofile_dev_container ]; then | ||
. ~/.bashprofile_dev_container | ||
# allow personalization of all devcontainers in this subdirectory | ||
# by placing a .devcontainer_rc file in the workspace root | ||
if [[ -f /workspaces/.devcontainer_rc ]] ; then | ||
source /workspaces/.devcontainer_rc | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.