improve settings

This commit is contained in:
Stefan Liebl 2018-06-28 10:26:36 +02:00
parent 54afdeb669
commit 160d00fb62
2 changed files with 33 additions and 27 deletions

View File

@ -36,6 +36,7 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
set wildignore+=**/firmware/src/device-control/** set wildignore+=**/firmware/src/device-control/**
elseif (g:project_type == 'topmode') elseif (g:project_type == 'topmode')
let s:Program = '/topmode' let s:Program = '/topmode'
let g:ProgramRemote = '/usr/toptica/topmode'
elseif (g:project_type == 'topmode-gui') elseif (g:project_type == 'topmode-gui')
let s:Program = '/TOPAS_Topmode' let s:Program = '/TOPAS_Topmode'
else else
@ -72,7 +73,7 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
" cmake " cmake
command! -nargs=1 -complete=custom,CmakeBuildTypes Cmake call s:Cmake('<args>', 0) command! -nargs=1 -complete=custom,CmakeBuildTypes Cmake call s:Cmake('<args>', 0)
function! CmakeBuildTypes(ArgLead, CmdLine, CorsorPos) function! CmakeBuildTypes(ArgLead, CmdLine, CorsorPos)
return join(['Debug', 'Release', 'RelWithDebInfo'], "\n") return join(['Debug', 'RelWithDebInfo'], "\n")
endfunction endfunction
" configure quickfix window for asyncrun " configure quickfix window for asyncrun
@ -85,21 +86,26 @@ function s:ProjectDlcproSet(project_type, project_base_dir)
if (g:project_type == 'topmode') if (g:project_type == 'topmode')
let g:GdbHost = 'topmode_stefan' let g:GdbHost = 'topmode_stefan'
let s:GdbSlave = '~/tools/gdb-slave-topmode.sh' let s:GdbSlave = '~/tools/gdb-slave-topmode.sh'
let g:GdbPort = '2345'
let g:GdbRoot = "/opt/OSELAS.Toolchain-2011.11.3/arm-cortexa8-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized"
elseif (g:project_type == 'shg') elseif (g:project_type == 'shg')
let g:GdbHost = 'dlcpro_stefan' let g:GdbHost = 'dlcpro_stefan'
let s:GdbSlave = '~/tools/shgcntl' let s:GdbSlave = '~/tools/shgcntl'
let g:GdbPort = '6666' let g:GdbPort = '6666'
let g:GdbRoot = "/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized"
else else
let g:GdbHost = 'dlcpro_stefan' let g:GdbHost = 'dlcpro_stefan'
let s:GdbSlave = '~/tools/gdb-slave.sh' let s:GdbSlave = '~/tools/gdb-slave.sh'
let g:GdbPort = '2345' let g:GdbPort = '2345'
let g:GdbRoot = "/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized"
endif endif
let g:GdbPath = '/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa8-linux-gnueabi-gdb' let g:ConqueGdb_GdbExe = g:GdbRoot.'/bin/arm-cortexa8-linux-gnueabi-gdb'
command! DlcProFirmwareUpdate call s:CopyFirmware('update') command! DlcProFirmwareUpdate call s:CopyFirmware('update')
command! DlcProFirmwareDebug call s:CopyFirmware('start-debug') command! DlcProFirmwareDebug call s:CopyFirmware('start-debug')
command! DlcProFirmwareAttach call s:CopyFirmware('attach-debug') command! DlcProFirmwareAttach call s:CopyFirmware('attach-debug')
command! DlcProFirmwareStart call s:CopyFirmware('start') command! DlcProFirmwareStart call s:CopyFirmware('start')
command! DlcProDebug call s:DlcProDebug(g:Program) command! DlcProDebug call s:DlcProDebug(g:Program, 0)
command! DlcProDebugAttach call s:DlcProDebug(g:Program, 1)
" vc-plugin " vc-plugin
let g:vc_branch_url = ['https://svn.toptica.com/svn/DiSiRa/SW/firmware/branches'] let g:vc_branch_url = ['https://svn.toptica.com/svn/DiSiRa/SW/firmware/branches']
@ -168,7 +174,6 @@ function s:Cmake(build_type, async_mode)
let args .= " -DCMAKE_BUILD_TYPE=".a:build_type let args .= " -DCMAKE_BUILD_TYPE=".a:build_type
let args .= " -DCMAKE_EXPORT_COMPILE_COMMANDS=1" let args .= " -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
if (g:project_type == 'device-control') if (g:project_type == 'device-control')
"let args .= " -DLICENSE_TOOL=1"
let args .= " -DBUILD_TARGET=target" let args .= " -DBUILD_TARGET=target"
let args .= " -DQT5_INSTALL_PATH=dlcpro-sdk/sysroot-target/usr/local/Qt-5.4.1" let args .= " -DQT5_INSTALL_PATH=dlcpro-sdk/sysroot-target/usr/local/Qt-5.4.1"
elseif (g:project_type == 'topmode') elseif (g:project_type == 'topmode')
@ -186,28 +191,28 @@ function s:CopyFirmware(command)
call system(command) call system(command)
endfunction endfunction
function DlcProDebugGfV(program) function s:DlcProDebug(program, attach)
execute 'GdbFromVimRemote '.g:GdbHost.':'.g:GdbPort if (a:attach == 0)
execute 'GdbFromVimSymbolFile '.g:Program DlcProFirmwareDebug
" GdbFromVimContinue sleep 1
" execute 'D set sysroot '.g:ProjectBuildDir.'/dlcpro-sdk/sysroot-target' ConqueGdbTab
endfunction execute "ConqueGdbCommand target extended-remote localhost:".g:GdbPort
execute "ConqueGdbCommand set remote exec-file ".g:ProgramRemote
function s:DlcProDebug(program) execute "ConqueGdbCommand file ".g:Program
DlcProFirmwareDebug ConqueGdbCommand break main
sleep 1 ConqueGdbCommand run
ConqueGdbTab else
" execute "ConqueGdbCommand target extended-remote ".g:GdbHost.":".g:GdbPort DlcProFirmwareAttach
execute "ConqueGdbCommand target extended-remote localhost:".g:GdbPort sleep 1
execute "ConqueGdbCommand set remote exec-file ".g:ProgramRemote execute "ConqueGdbTab ".g:Program
execute "ConqueGdbCommand file ".g:Program execute "ConqueGdbCommand target remote localhost:".g:GdbPort
ConqueGdbCommand break main " get remote src path with gdb: info sources or gdb: break main
ConqueGdbCommand run " let base_src_path = "/jenkins/workspace/dlcpro--firmware_master-MI572KOOZYUCDMJBCIVUZYNOMEKEXEJCF7BO436VK2FRJ4E32MGQ/source/"
" execute "ConqueGdbCommand set substitute-path ".base_src_path. ".s:ProjectSrcDir
"ConqueGdbCommand set sysroot /home/liebl/dlcpro/firmware/build/dlcpro-sdk/sysroot-target/ endif
ConqueGdbCommand set sysroot /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/sysroot-arm-cortexa8-linux-gnueabi
ConqueGdbCommand set solib-search-path /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/arm-cortexa8-linux-gnueabi/lib/
execute "ConqueGdbCommand set sysroot ".g:GdbRoot."/sysroot-arm-cortexa8-linux-gnueabi"
execute "ConqueGdbCommand set solib-search-path ".g:GdbRoot."/arm-cortexa8-linux-gnueabi/lib/"
endfunction endfunction
" ================ " ================

View File

@ -17,7 +17,7 @@ let &runtimepath = &runtimepath . ',' . g:vimfiles . '/after'
let &runtimepath = &runtimepath . ',' . g:vimsuite . '/vimfiles.stefan/after' let &runtimepath = &runtimepath . ',' . g:vimsuite . '/vimfiles.stefan/after'
" packages liegen unter vimsuite/pack " packages liegen unter vimsuite/pack
let &packpath = g:vimsuite execute "set packpath+=".g:vimsuite
" Laden weiterer Einstellungen: " Laden weiterer Einstellungen:
if (has("win32") || has("win64")) if (has("win32") || has("win64"))
@ -171,9 +171,10 @@ set sessionoptions-=blank
set sessionoptions+=buffers set sessionoptions+=buffers
set sessionoptions+=curdir set sessionoptions+=curdir
set sessionoptions+=folds set sessionoptions+=folds
set sessionoptions+=help set sessionoptions-=help
set sessionoptions+=resize set sessionoptions+=resize
set sessionoptions+=tabpages set sessionoptions+=tabpages
set sessionoptions-=terminal
set sessionoptions+=winsize set sessionoptions+=winsize
" open window size " open window size
if &diff if &diff