From: Tarek B. <tar...@gm...> - 2020-05-17 15:19:13
|
again on this: Info : 715 209748 aarch64.c:1041 aarch64_post_debug_entry(): cannot read system control register in this mode this is caused by the fact that HYP mode is managed in aarch64_post_debug_entry but in this case aarch64_post_debug_entry return ERROR_FAIL causing aarch64_debug_entry and aarch64_poll to fail too. I adedd this : http://openocd.zylin.com/#/c/5686/1 but then I noticed that there is already a change regarding HYP waiting in : http://openocd.zylin.com/#/c/5255/1 could you please check it, before I abandon my 2 small patches Le sam. 16 mai 2020 à 14:37, Mario Palomares <pal...@gm...> a écrit : > Hello everyone, > > I am trying to debug some RTEMS executable on my RPI2 v1.2 (it has BCM2837 > with ARMv8-A53) and right know i get successfully the conection but i am > experiencing some strange behaviours when connecting from telnet and from > GDB. > > *TELNET PROBLEMS* > > As you may know BCM2837 SoC has 4 cores, and by default the RTEMS > executable is loaded in core0. Whenever i halt that CPU (cpu0) everything > goes right but when i try to halt any other it gives me this error: > > Debug: 695 204314 command.c:143 script_debug(): command - targets targets > Debug: 699 208650 command.c:143 script_debug(): command - halt halt > Debug: 701 208801 target.c:3028 handle_halt_command(): - > Debug: 702 208802 aarch64.c:368 aarch64_halt_one(): rpi2.a53.3 > Debug: 704 209102 aarch64.c:959 aarch64_debug_entry(): rpi2.a53.3 dscr = > 0x03044213 > Debug: 706 209288 armv8_dpm.c:665 dpmv8_read_reg(): READ: x0, > 00000003 > Debug: 707 209341 armv8_dpm.c:665 dpmv8_read_reg(): READ: x1, > 00000131 > Error: 708 209422 armv8.c:117 armv8_mode_name(): unrecognized psr mode: > 0x1a > Debug: 709 209423 armv8.c:713 armv8_set_cpsr(): set CPSR 0x600001da: > UNRECOGNIZED mode, AArch32 state > Debug: 710 209503 armv8_dpm.c:665 dpmv8_read_reg(): READ: pc, > 000000a8 > Debug: 711 209585 armv8_dpm.c:665 dpmv8_read_reg(): READ: ELR_EL2, > 393c03b1 > Debug: 712 209666 armv8_dpm.c:667 dpmv8_read_reg(): READ: ESR_EL2, 68993d79 > Debug: 714 209748 armv8_dpm.c:667 dpmv8_read_reg(): READ: SPSR_EL2, > 600001da > Info : 715 209748 aarch64.c:1041 aarch64_post_debug_entry(): cannot read > system control register in this mode > > Another thing I think is related to this happens whenever i try to load a > program from my host computer to memory. If load the program on the CPU0 > (the one with the RTEMS executable) y get the following error: > > Debug: 1190 1125169 command.c:143 script_debug(): command - load_image > load_image /home/mario/Documents/fastblink.exe > Debug: 1192 1125320 configuration.c:97 find_file(): found > /home/mario/Documents/fastblink.exe > Debug: 1193 1125322 image.c:69 autodetect_image_type(): ELF image detected. > Debug: 1194 1125322 configuration.c:97 find_file(): found > /home/mario/Documents/fastblink.exe > Debug: 1195 1125322 image.c:494 image_elf_read_section(): load segment 0 > at 0x0 (sz = 0xd4) > Debug: 1196 1125322 image.c:501 image_elf_read_section(): read elf: size = > 0x212 at 0x8000 > Debug: 1197 1125322 target.c:2148 target_write_buffer(): writing buffer of > 212 byte at 0x00008000 > Error: 1199 1125836 aarch64.c:1884 aarch64_write_cpu_memory(): abort > occurred - dscr = 0x03044153 > Debug: 1200 1126035 armv8_dpm.c:1338 armv8_dpm_handle_exception(): > Exception taken to EL 1, DLR=0x0000000000200010 DSPSR=0x400f0173 > Debug: 1201 1126035 armv8_dpm.c:560 armv8_dpm_modeswitch(): restoring > mode, cpsr = 0x400f0173 > Debug: 1202 1126035 armv8_dpm.c:598 armv8_dpm_modeswitch(): target_el = 1, > last_el = 1 > Debug: 1203 1126035 armv8_dpm.c:611 armv8_dpm_modeswitch(): SPSR = > 0x400f0173 > Debug: 1204 1126127 command.c:630 run_command(): Command 'load_image' > failed with error code -4 > User : 1205 1126127 command.c:695 command_run_line(): > > But no any other CPU it loads the program correctly > > *GDB PROBLEMS* > > Related to this i get two different errors. One is that there is a > periodically message telling: > > Debug: 1281 1253785 log.c:409 keep_alive(): keep_alive() was not invoked > in the 1000ms timelimit (1853). This may cause trouble with GDB connections. > > The other one i have also asked in the RTEMS mailing list but i tell it > also here in case you know. Apparently the gdb versión the RTEMS source > builder builds isn´t compatible with the gdbserver openOCD starts. The > RTEMS gdb configuration is the following: > > configure --host=x86_64-linux-gnu --target=arm-rtems5 > --with-auto-load-dir=$debugdir:$datadir/auto-load > --with-auto-load-safe-path=$debugdir:$datadir/auto-load > --with-expat > > --with-gdb-datadir=/home/mario/development/rtems/compiler/5/share/gdb > (relocatable) > > --with-jit-reader-dir=/home/mario/development/rtems/compiler/5/lib/gdb > (relocatable) > --without-libunwind-ia64 > --with-lzma > --with-babeltrace > --without-intel-pt > --disable-libmcheck > --with-mpfr > --with-python=/usr > --without-guile > --disable-source-highlight > > --with-separate-debug-dir=/home/mario/development/rtems/compiler/5/lib/debug > (relocatable) > > The error i get when i connect is the following > > warning: while parsing target description (at line 4): Target description > specified unknown architecture "aarch64" > warning: Could not load XML target description; ignoring > Truncated register 16 in remote 'g' packet > > I have tried with gdb-multiarch but get the following error: > > warning: Architecture rejected target-supplied description > > I know those are lots of question but i would appreciate on any of them. > > If you need more info about my environment let me know > > Regards, > Mario > > _______________________________________________ > OpenOCD-user mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openocd-user > |