I suddenly have a Hard Fault 0x00018fc2 when powercycling and booting NG via USB Power / USB Data Connection.
If the bootloader jumper is connected i can use the USB Connection to upload the bootloader . but after uploading NG again and rebooting , it wont boot back up after power cycling the USB Connection.
The App will boot properly with external power and detached USB cabel.
this suddenly occured
i use a self powered usb hub .
i tried disconnecting all attachments ( sdcard , scs ,etc .. ) but that does not change the behaviour.
I also recompiled the hex and tried again , but no luck.
hmm, i would first jumper all J5A/B/C - if they are open… so you have no noise from the ADCs… I know USB has nothing to do with ADCs, but that i would do first ( because that happend often when it not booted up)
A virgin NG1.037? or somekind modified? (like the font thingi?)
post what you have in “mios32_config.h”
else i dont know, mostly i get hardfault when writing negtativ values intos unsigned integer variables (aka use s16 instead of u16 variables), or doing mess with custom freertos tasks… i am really no expert for NG… you could post the code here (zip) and i can try if it does the same, have a stm or lpc here to test..
this is writing while building (for those who looking into this tread, and having a glue…)
Quote
autark@Projekt:~/midibox/mios32/apps/controllers/midibox_ng_v1$ make clean
rm -rf project_build
autark@Projekt:~/midibox/mios32/apps/controllers/midibox_ng_v1$ make
rm -f project.hex
Creating object file for app.c
Creating object file for mbng_sysex.c
Creating object file for mbng_patch.c
Creating object file for mbng_event.c
Creating object file for mbng_din.c
Creating object file for mbng_dout.c
Creating object file for mbng_dio.c
Creating object file for mbng_rgbled.c
Creating object file for mbng_enc.c
Creating object file for mbng_ain.c
Creating object file for mbng_ainser.c
Creating object file for mbng_kb.c
Creating object file for mbng_matrix.c
Creating object file for mbng_cv.c
Creating object file for mbng_mf.c
Creating object file for mbng_lcd.c
Creating object file for mbng_seq.c
Creating object file for mbng_file.c
Creating object file for mbng_file_c.c
Creating object file for mbng_file_l.c
Creating object file for mbng_file_s.c
Creating object file for mbng_file_r.c
src/mbng_file_r.c: In function ‘setTokenizedValue’:
src/mbng_file_r.c:1902:8: warning: unused variable ‘is_range’ [-Wunused-variable]
Creating object file for mbng_file_k.c
Creating object file for terminal.c
src/terminal.c: In function ‘TERMINAL_ParseLine’:
src/terminal.c:494:11: warning: implicit declaration of function ‘MBNG_FILE_K_Write’ [-Wimplicit-function-declaration]
Creating object file for scs_config.c
Creating object file for main.c
Creating object file for strtol.c
Creating object file for tasks.c
Creating object file for list.c
Creating object file for queue.c
Creating object file for timers.c
Creating object file for port.c
/home/autark/midibox/mios32/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c: In function ‘prvPortStartFirstTask’:
/home/autark/midibox/mios32/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c:282:1: warning: stack usage computation not supported for this target [enabled by default]
Creating object file for heap_4.c
Creating object file for startup_LPC17xx.c
Creating object file for mios32_srio.c
Creating object file for mios32_din.c
Creating object file for mios32_dout.c
Creating object file for mios32_enc.c
Creating object file for mios32_lcd.c
Creating object file for mios32_midi.c
Creating object file for mios32_osc.c
Creating object file for mios32_com.c
Creating object file for mios32_uart_midi.c
Creating object file for mios32_spi_midi.c
Creating object file for mios32_iic_midi.c
Creating object file for mios32_iic_bs.c
Creating object file for mios32_mf.c
Creating object file for mios32_sdcard.c
Creating object file for mios32_enc28j60.c
Creating object file for mios32_timestamp.c
Creating object file for mios32_bsl.c
Creating object file for mios32_sys.c
Creating object file for mios32_irq.c
Creating object file for mios32_spi.c
Creating object file for mios32_i2s.c
Creating object file for mios32_board.c
Creating object file for mios32_timer.c
Creating object file for mios32_stopwatch.c
Creating object file for mios32_delay.c
Creating object file for mios32_ain.c
Creating object file for mios32_usb.c
Creating object file for mios32_usb_midi.c
Creating object file for mios32_usb_com.c
Creating object file for mios32_uart.c
Creating object file for mios32_iic.c
Creating object file for printf-stdarg.c
Creating object file for core_cm3.c
/home/autark/midibox/mios32/drivers/LPC17xx/CMSIS/src/core_cm3.c: In function ‘__get_PSP’:
/home/autark/midibox/mios32/drivers/LPC17xx/CMSIS/src/core_cm3.c:451:1: warning: stack usage computation not supported for this target [enabled by default]
Creating object file for usbhw_lpc.c
Creating object file for usbcontrol.c
/home/autark/midibox/mios32/drivers/LPC17xx/usbstack/src/usbcontrol.c: In function ‘StallControlPipe’:
/home/autark/midibox/mios32/drivers/LPC17xx/usbstack/src/usbcontrol.c:127:6: warning: variable ‘pb’ set but not used [-Wunused-but-set-variable]
Creating object file for usbstdreq.c
Creating object file for usbinit.c
Creating object file for app_lcd.c
Creating object file for glcd_font_normal.c
Creating object file for glcd_font_normal_inv.c
Creating object file for glcd_font_big.c
Creating object file for glcd_font_small.c
Creating object file for glcd_font_tiny.c
Creating object file for glcd_font_knob_icons.c
Creating object file for glcd_font_meter_icons_h.c
Creating object file for glcd_font_meter_icons_v.c
Creating object file for midi_router.c
Creating object file for midi_port.c
Creating object file for midimon.c
Creating object file for uip.c
Creating object file for uip_arp.c
Creating object file for uiplib.c
Creating object file for psock.c
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function ‘psock_send’:
/home/autark/midibox/mios32/modules/uip/uip/psock.c:179:3: warning: variable ‘PT_YIELD_FLAG’ set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function ‘psock_generator_send’:
/home/autark/midibox/mios32/modules/uip/uip/psock.c:218:3: warning: variable ‘PT_YIELD_FLAG’ set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function ‘psock_readto’:
/home/autark/midibox/mios32/modules/uip/uip/psock.c:274:3: warning: variable ‘PT_YIELD_FLAG’ set but not used [-Wunused-but-set-variable]
/home/autark/midibox/mios32/modules/uip/uip/psock.c: In function ‘psock_readbuf’:
/home/autark/midibox/mios32/modules/uip/uip/psock.c:301:3: warning: variable ‘PT_YIELD_FLAG’ set but not used [-Wunused-but-set-variable]
Creating object file for timer.c
Creating object file for uip-neighbor.c
Creating object file for memb.c
Creating object file for clock-arch.c
Creating object file for network-device.c
Creating object file for lpc17xx_emac.c
Creating object file for uip_task.c
Creating object file for dhcpc.c
Creating object file for osc_server.c
Creating object file for osc_client.c
Creating object file for uip_terminal.c
Creating object file for freertos_utils.c
Creating object file for keyboard.c
Creating object file for ainser.c
Creating object file for aout.c
Creating object file for max72xx.c
Creating object file for ws2812.c
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:75:2: warning: #warning “WS2812 driver not supported for this derivative yet!” [-Wcpp]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:111:12: warning: ‘ws2812_send_double_buffer’ defined but not used [-Wunused-variable]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:119:12: warning: ‘ws2812_state_ctr’ defined but not used [-Wunused-variable]
/home/autark/midibox/mios32/modules/ws2812/ws2812.c:122:11: warning: ‘ws2812_rgb_values’ defined but not used [-Wunused-variable]
Creating object file for notestack.c
Creating object file for diskio.c
Creating object file for ccsbcs.c
Creating object file for ff.c
Creating object file for file.c
Creating object file for md5.c
Creating object file for seq_bpm.c
Creating object file for seq_midi_out.c
Creating object file for msd.c
Creating object file for msc_bot.c
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_bot.c: In function ‘MSCBotBulkOut’:
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_bot.c:268:13: warning: variable ‘iChunk’ set but not used [-Wunused-but-set-variable]
Creating object file for msc_scsi.c
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_scsi.c: In function ‘SCSIHandleCmd’:
/home/autark/midibox/mios32/modules/msd/LPC17xx/msc_scsi.c:155:14: warning: variable ‘dwLBA’ set but not used [-Wunused-but-set-variable]
Creating object file for blockdev_sd.c
Creating object file for scs.c
Creating object file for scs_lcd.c
Creating object file for mini_cpp.cpp
Creating object file for freertos_heap.cpp
arm-none-eabi-size project_build/project.elf
text data bss dec hex filename
269514 152 64256 333922 51862 project_build/project.elf
10000000 B __ram_start
10007fd8 B __ram_end
2007c000 D __ram_start_ahb
20083bc0 B __ram_end_ahb