From 674363214075c751df862ae87a9cd5ab28194cce Mon Sep 17 00:00:00 2001 From: John Ogness Date: Thu, 5 Apr 2018 09:19:52 +0200 Subject: add eclipse and preempt-rt notes These are notes that may be helpful for trainers when preparing for a schulung. Signed-off-by: John Ogness --- .../notes/HOWTO-eclipse-cross-remote.txt | 43 +++++++++++++++++++ schulung_tools/notes/preempt-rt-tips.txt | 50 ++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 schulung_tools/notes/HOWTO-eclipse-cross-remote.txt create mode 100644 schulung_tools/notes/preempt-rt-tips.txt (limited to 'schulung_tools/notes') diff --git a/schulung_tools/notes/HOWTO-eclipse-cross-remote.txt b/schulung_tools/notes/HOWTO-eclipse-cross-remote.txt new file mode 100644 index 0000000..45c8d02 --- /dev/null +++ b/schulung_tools/notes/HOWTO-eclipse-cross-remote.txt @@ -0,0 +1,43 @@ +(setup cross project) +File -> New -> C Project +"C Project" window + Project name: hello + Project type: Hello World ANSI C Project + Toolchains: Cross GCC +"Basic Settings" window + (author, copyright, ...) +"Select Configurations" window + Debug, Release +"Cross GCC Command" window + Cross compiler prefix: arm-linux-gnueabihf- + Cross compiler path: /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin + +(modify existing project) +Project -> Properties +C/C++ Build -> Settings + +(setup debug) +Run -> Debug Configurations +"Create, manage, and run configurations" window + select "C/C++ Remote Application" and click "New" icon +"Main" tab + Connection: New... +"Create a new connection" window + Connection type: SSH +"New Connection" window + Connection name: qemu-arm + Host: localhost + User: root + Password based authentication + Password: root + Advanced + Port: 2222 + Use login shell + Login shell command: /bin/sh -c '{0}' +"Main" tab + Remote Abolsute File Path for C/C++ Application: /hello +"Debugger" tab + "Main" sub-tab + GDB debugger: /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdb + "Gdbserver Settings" sub-tab + Port number: 12345 diff --git a/schulung_tools/notes/preempt-rt-tips.txt b/schulung_tools/notes/preempt-rt-tips.txt new file mode 100644 index 0000000..89b4204 --- /dev/null +++ b/schulung_tools/notes/preempt-rt-tips.txt @@ -0,0 +1,50 @@ +# download 4.14 kernel +wget --continue https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.tar.xz + +# download 4.14 -> 4.14.27 stable kernel patch +wget --continue https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-4.14.27.xz + +# download 4.14.27 -> 4.14.27-rt21 realtime kernel patch +wget --continue https://www.kernel.org/pub/linux/kernel/projects/rt/4.14/older/patch-4.14.27-rt21.patch.xz + +# unpack 4.14 kernel +tar xJf linux-4.14.tar.xz + +# apply 4.14.27 stable kernel patch +xzcat patch-4.14.27.xz | patch -p 1 -d linux-4.14 + +# apply 4.14.27-rt21 realtime kernel patch +xzcat patch-4.14.27-rt21.patch.xz | patch -p 1 -d linux-4.14 + + +# +# kernel options to be aware of +# +# (must be set to activate all realtime features) +# CONFIG_PREEMPT_RT_FULL +# +# (disable prio99 watchdog debug tasks, unless really needed/wanted) +# CONFIG_LOCKUP_DETECTOR +# CONFIG_DETECT_HUNG_TASK +# +# (reduced power, but greater latencies, disable it) +# (use CONFIG_100_HZ and CONFIG_HZ_PERIODIC instead) +# CONFIG_NO_HZ +# +# (additional NOPs inserted to each function, ok to enable so you have ftrace) +# CONFIG_FTRACE +# +# (reduced power, but greater latencies, disable appropriately) +# CONFIG_CPU_IDLE +# +# (may cause very large overheads and latencies, disable appropriately) +# CONFIG_DEBUG_* +# +# (make sure these are enabled, but only use "performance") +# CONFIG_CPU_FREQ_GOV_* +# CONFIG_CPU_FREQ_DEFAULT_* +# +# (causes unnecessary processing, for systems that do not need it, +# disable if not needed) +# CONFIG_HIGHMEM +# -- cgit v1.2.3