7 years, 6 months ago.

Error HardFault_Handler

I have a Error in this Script: char BufferAsc[256];

if(ZeilenAsc==0) { pc.printf("ZeilenASC=%d\r\n",ZeilenAsc); FILE *asc = fopen("/local/Trace.asc","r"); pc.printf("Ende einlesen\r\n"); while(fgets(BufferAsc, 256, asc)) { printf("Line: %s\n", BufferAsc); ZeilenAsc=ZeilenAsc++; pc.printf("ZeilenASC=%d\r\n",ZeilenAsc); }

The Error is in this Line: while(fgets(BufferAsc, 256, asc))

That is not the whole Script but I hope someone can help me. The Programm shut run on a mBED 1768

AFTER_VECTORS void HardFault_Handler (void) {}

Output debug Console:

GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150304-cvs Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "host=i686-w64-mingw32 target=arm-none-eabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". 0x00000986 in serial_putc (obj=0x10000d74 <stdio_uart>, c=32) at ../mbed-src/targets/hal/TARGET_NXP/TARGET_LPC176X/serial_api.c:358 358 while (!serial_writable(obj)); Warning: the current language does not match this frame. Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 2, static_initialization_and_destruction_0 (initialize_p=1, priority=65535) at ../RBS_Light/main.cpp:18 18 LocalFileSystem local("local"); Lokale Dateisystem deklarieren

Breakpoint 4, main () at ../RBS_Light/main.cpp:44 44 {

Breakpoint 5, main () at ../RBS_Light/main.cpp:71 71 if(ZeilenAsc==0) { Nur beim ersten mal ausf�hren

Program received signal SIGSTOP, Stopped (signal). HardFault_Handler () at ../mbed-src/targets/cmsis/TARGET_NXP/TARGET_LPC176X/TOOLCHAIN_GCC_CR/startup_LPC17xx.cpp:164 164 AFTER_VECTORS void HardFault_Handler (void) {}

Be the first to answer this question.