Undefined Instruction in <__fclose_from_thumb>

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undefined Instruction in <__fclose_from_thumb>

1,136 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Thu Feb 13 12:19:33 MST 2014
I'm currently making a bigger project with the LPC1115/302

After the last change (adding BTStack code) a strange error occured:

I am compiling with the semihosted RedLib library to debug all the stuff.
When the startup code is calling the __main, I get a hardfault interrupt.

I tracked it down to this section:
20d8:10000ec4 .word0x10000ec4
    20dc:00000000 .word0x00000000

000020e0 <__fclose_from_thumb>:
    20e0:e51ff004 ldrpc, [pc, #-4]; 20e4 <__fclose_from_thumb+0x4>
    20e4:10000ca4 .word0x10000ca4

000020e8 <__fseek_from_thumb>:
    20e8:e51ff004 ldrpc, [pc, #-4]; 20ec <__fseek_from_thumb+0x4>
    20ec:10000ca0 .word0x10000ca0
    20f0:74735442 .word0x74735442


When the __main is calling _initio the code on some point comes to calling __fclose_from_thumb
In the disassembly of the compiled code everything looks quite normal (to me)

But in the disassembly view of the debugger (LPC-Link) there is an undefined instruction:

000020da:   asrs    r0, r0, #32
000020dc:   movs    r0, r0
000020de:   movs    r0, r0
          __fclose_from_thumb:
000020e0:                   ; <UNDEFINED> instruction: 0xf004e51f
000020e4:   lsrs    r4, r4, #18
000020e6:   asrs    r0, r0, #32
          __fseek_from_thumb:
000020e8:                   ; <UNDEFINED> instruction: 0xf004e51f
000020ec:   lsrs    r0, r4, #18
000020ee:   asrs    r0, r0, #32


Which of course produces an HardFault Interrupt when this section is called.

What can I do? I have absolutely no clue how to avoid this, and why it is suddenly an undefined instruction.

Sadly I cant post a minimum example. When I create a minimal project, this part is not included in the binary (and everything works). But this part definitely is from the RedLib library, and therefore is not influenced by my code (only by if it is needed, or not)

Anything would help, thanks!
Labels (1)
0 Kudos
18 Replies

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 09:02:10 MST 2014
I don't know, without understanding your application. But fundamentally, the problem will only occur when fclose or fseek are called. They are not called in the simple "Hello World" examples.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 08:38:42 MST 2014
That was actually the anser ... ! Thanks for the help!

Strangely it seemed to work with a simple "Hello World" example with these lines.

Under the risk that I don't understand it: what happened here?!

Thanks for your fast help!
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 08:13:13 MST 2014
They are obsolete (from an old version of LPCXpresso) - delete the line.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 08:01:15 MST 2014
This is, indeed, correct.

// Defining these two symbols enables semihosting in the Code Red debugger
volatile int fseek, fclose;


But I didn't suspect it, since it is in the debug_printf.c which I took from the ADC Example for the LPC111x.

What do they mean?
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 07:16:52 MST 2014
I think I know what your problem is...

You have a VARIABLE defined called fclose (and another called fseek).
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 07:10:07 MST 2014
Sadly I can't publish the whole project here, but this is a good starting point, I will look through the code (BTStack is also quite huge, and has many files) so maybe there is something like what you mentioned.

It does not include assembler routines, so that won't be the issue, but I can imagine that somewhere something interferes with fclose(), because this stack also can be run unter an OS environment. I will have a detailed look on that.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 07:02:02 MST 2014
Thinking about this a bit more (and something we mentioned initially, but have forgotten about since)...

__flcose_from_thumb is a linker generated routine known as a veneer. It allows fclose() to be called from thumb state. As a Cortex-M processor ONLY has thumb state there is a problem. It this implies that fclose() is being compiled as arm code, or is being linked from an ARM-compiled library.

I suggest you look through your project:
- is an alternate fclose() being defined somewhere?
- are any modules being compiled for ARM state?
- do you have any assembler modules that are (accidentally) defining ARM state anywhere?

Without having access to your project, it is impossible for us to know where you have gone wrong...
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 06:35:30 MST 2014

Quote:
are you *sure* the exception is being caused by that function? How did you work that out?


I am as sure as I can be. The vectptr register says:
Fault PC   = 0x0000897E
           = _fdopen + 10 in section .text


Which is the following instruction:
0000897f:   blx     0x9860 <__fclose_from_thumb>


Which calls __fclose_from_thumb

On this address lies the undefined instruction
00009860:                   ; <UNDEFINED> instruction: 0xf004e51f


So as far as I can tell this instruction generates the HardFault.

I still couldn't figure out how to read the flash into a file with the LPC-Link, but as this whole program works when I'm switching to newlib, I don't think this is the issue. (but I will try to confirm equality between the .axf and the on chip binary)
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 06:26:29 MST 2014
1. You can show the Opcodes with a preference:
Preferences->LPCXpresso->Disassembly
(if you are already showing the disassembly window, you will need to refresh)

2. You can use the Memory view to view memory. Make sure you are using the Traditional rendering. Note that you can export (and import) the memory to a file too.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 05:19:07 MST 2014
Is there a convenient way to load the program code out of the chip with the LPC-Link? I mean other than the Disassembly view while debugging?

Because that view does not display die opcodes in hexadecimal format.

So is there a way to dump the contents of the chip to a file?
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 04:21:22 MST 2014
The link and the mapfile look fine - the correct libraries are being linked in.

So,
- are you *sure* the exception is being caused by that function? How did you work that out?
- has the flash been programmed correctly? You could try disassembling the .axf file (RIght-click->Binary utilities->Disassemble) and comparing with the values in flash. (unlikely, but worth checking)

Also, you could try posting your (zipped) axf file, so we can try here.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Fri Feb 14 02:28:56 MST 2014
I used pastebin for the linker output to avoid excessive text blocks here, maybe that triggered the spam filter ...

Nevertheless another try:


Building target: Sensormodul.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Wl,--verbose -Xlinker -Map="Sensormodul.map" -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "Sensormodul_Debug.ld" -o "Sensormodul.axf"  ./startup/cr_startup_lpc11.o  ./src/MadgwickAHRS.o ./src/MahonyAHRS.o ./src/blinky_main.o ./src/flash.o ./src/i2c_sensors.o ./src/led.o ./src/nRF24AP.o ./src/powerManagement.o ./src/power_profiles.o ./src/printf_stub.o ./src/retarget.o ./src/signalProcessing.o ./src/systickDelay.o ./src/util.o  ./driver/adc.o ./driver/clkconfig.o ./driver/crp.o ./driver/debug_printf.o ./driver/gpio.o ./driver/i2c.o ./driver/ssp.o ./driver/timer16.o ./driver/timer32.o ./driver/uart.o  ./cmsis/core_cm0.o ./cmsis/system_LPC11xx.o  ./btstack/chipset-cc256x/ant_cmds.o ./btstack/chipset-cc256x/bt_control_cc256x.o  ./btstack-src/btstack_memory.o ./btstack-src/hal_uart_dma.o ./btstack-src/hci.o ./btstack-src/hci_cmds.o ./btstack-src/hci_dump.o ./btstack-src/hci_transport_h4_dma.o ./btstack-src/hci_transport_h4_ehcill_dma.o ./btstack-src/l2cap.o ./btstack-src/l2cap_signaling.o ./btstack-src/linked_list.o ./btstack-src/memory_pool.o ./btstack-src/remote_device_db_memory.o ./btstack-src/rfcomm.o ./btstack-src/run_loop.o ./btstack-src/run_loop_embedded.o ./btstack-src/sdp.o ./btstack-src/sdp_client.o ./btstack-src/sdp_parser.o ./btstack-src/sdp_query_rfcomm.o ./btstack-src/sdp_query_util.o ./btstack-src/sdp_util.o ./btstack-src/utils.o  ./btstack/hal_cpu.o ./btstack/hal_tick.o   
../btstack/hal_tick.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
GNU ld (GNU Tools for ARM Embedded Processors) 2.21.1.20121016-crt002
  Supported emulations:
   armelf
opened script file Sensormodul_Debug.ld
opened script file Sensormodul_Debug_lib.ld
opened script file Sensormodul_Debug_mem.ld
using external linker script:
==================================================
/*
 * GENERATED FILE - DO NOT EDIT
 * (c) Code Red Technologies Ltd, 2008-2014
 * (c) NXP Semiconductors 2013-2014
 * Linker script memory definitions
 * Created from LinkMemoryTemplate
 * By LPCXpresso v6.1.2 [Build 177] [2013-11-28]  on Fri Feb 14 10:23:53 CET 2014)
*/

MEMORY
{
  /* Define each memory region */
  MFlash64 (rx) : ORIGIN = 0x0, LENGTH = 0x10000 /* 64K bytes */
  RamLoc8 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* 8K bytes */


}
  /* Define a symbol for the top of each memory region */
  __top_MFlash64 = 0x0 + 0x10000;
  __top_RamLoc8 = 0x10000000 + 0x2000;




==================================================
attempt to open ./startup/cr_startup_lpc11.o succeeded
./startup/cr_startup_lpc11.o
attempt to open ./src/MadgwickAHRS.o succeeded
./src/MadgwickAHRS.o
attempt to open ./src/MahonyAHRS.o succeeded
./src/MahonyAHRS.o
attempt to open ./src/blinky_main.o succeeded
./src/blinky_main.o
attempt to open ./src/flash.o succeeded
./src/flash.o
attempt to open ./src/i2c_sensors.o succeeded
./src/i2c_sensors.o
attempt to open ./src/led.o succeeded
./src/led.o
attempt to open ./src/nRF24AP.o succeeded
./src/nRF24AP.o
attempt to open ./src/powerManagement.o succeeded
./src/powerManagement.o
attempt to open ./src/power_profiles.o succeeded
./src/power_profiles.o
attempt to open ./src/printf_stub.o succeeded
./src/printf_stub.o
attempt to open ./src/retarget.o succeeded
./src/retarget.o
attempt to open ./src/signalProcessing.o succeeded
./src/signalProcessing.o
attempt to open ./src/systickDelay.o succeeded
./src/systickDelay.o
attempt to open ./src/util.o succeeded
./src/util.o
attempt to open ./driver/adc.o succeeded
./driver/adc.o
attempt to open ./driver/clkconfig.o succeeded
./driver/clkconfig.o
attempt to open ./driver/crp.o succeeded
./driver/crp.o
attempt to open ./driver/debug_printf.o succeeded
./driver/debug_printf.o
attempt to open ./driver/gpio.o succeeded
./driver/gpio.o
attempt to open ./driver/i2c.o succeeded
./driver/i2c.o
attempt to open ./driver/ssp.o succeeded
./driver/ssp.o
attempt to open ./driver/timer16.o succeeded
./driver/timer16.o
attempt to open ./driver/timer32.o succeeded
./driver/timer32.o
attempt to open ./driver/uart.o succeeded
./driver/uart.o
attempt to open ./cmsis/core_cm0.o succeeded
./cmsis/core_cm0.o
attempt to open ./cmsis/system_LPC11xx.o succeeded
./cmsis/system_LPC11xx.o
attempt to open ./btstack/chipset-cc256x/ant_cmds.o succeeded
./btstack/chipset-cc256x/ant_cmds.o
attempt to open ./btstack/chipset-cc256x/bt_control_cc256x.o succeeded
./btstack/chipset-cc256x/bt_control_cc256x.o
attempt to open ./btstack-src/btstack_memory.o succeeded
./btstack-src/btstack_memory.o
attempt to open ./btstack-src/hal_uart_dma.o succeeded
./btstack-src/hal_uart_dma.o
attempt to open ./btstack-src/hci.o succeeded
./btstack-src/hci.o
attempt to open ./btstack-src/hci_cmds.o succeeded
./btstack-src/hci_cmds.o
attempt to open ./btstack-src/hci_dump.o succeeded
./btstack-src/hci_dump.o
attempt to open ./btstack-src/hci_transport_h4_dma.o succeeded
./btstack-src/hci_transport_h4_dma.o
attempt to open ./btstack-src/hci_transport_h4_ehcill_dma.o succeeded
./btstack-src/hci_transport_h4_ehcill_dma.o
attempt to open ./btstack-src/l2cap.o succeeded
./btstack-src/l2cap.o
attempt to open ./btstack-src/l2cap_signaling.o succeeded
./btstack-src/l2cap_signaling.o
attempt to open ./btstack-src/linked_list.o succeeded
./btstack-src/linked_list.o
attempt to open ./btstack-src/memory_pool.o succeeded
./btstack-src/memory_pool.o
attempt to open ./btstack-src/remote_device_db_memory.o succeeded
./btstack-src/remote_device_db_memory.o
attempt to open ./btstack-src/rfcomm.o succeeded
./btstack-src/rfcomm.o
attempt to open ./btstack-src/run_loop.o succeeded
./btstack-src/run_loop.o
attempt to open ./btstack-src/run_loop_embedded.o succeeded
./btstack-src/run_loop_embedded.o
attempt to open ./btstack-src/sdp.o succeeded
./btstack-src/sdp.o
attempt to open ./btstack-src/sdp_client.o succeeded
./btstack-src/sdp_client.o
attempt to open ./btstack-src/sdp_parser.o succeeded
./btstack-src/sdp_parser.o
attempt to open ./btstack-src/sdp_query_rfcomm.o succeeded
./btstack-src/sdp_query_rfcomm.o
attempt to open ./btstack-src/sdp_query_util.o succeeded
./btstack-src/sdp_query_util.o
attempt to open ./btstack-src/sdp_util.o succeeded
./btstack-src/sdp_util.o
attempt to open ./btstack-src/utils.o succeeded
./btstack-src/utils.o
attempt to open ./btstack/hal_cpu.o succeeded
./btstack/hal_cpu.o
attempt to open ./btstack/hal_tick.o succeeded
./btstack/hal_tick.o
attempt to open libcr_semihost.a failed
attempt to open c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_semihost.a failed
attempt to open c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a succeeded
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_write.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)_cr__main.o
attempt to open libcr_c.a failed
attempt to open c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_c.a failed
attempt to open c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a succeeded
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)acosf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)cosf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)fabsf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)sinf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)memcpy.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)memset.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)alloc.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)fpprintf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)initio.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)memcmp.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)printf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)setvbuf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)sqrt.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)stdio.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)strcat.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)strcpy.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)strlen.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)strncmp.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)strncpy.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_asinacosf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_sincosf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)sqrtf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)__fillbuf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)__init_alloc.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_deferredlazyseek.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_fdopen.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_fflush.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_frexpl.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_hugeval.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_ldexpl.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)_writebuf.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a)errno.o
attempt to open libcr_eabihelpers.a failed
attempt to open c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a succeeded
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a)division.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a)double.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a)float.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a)llong.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/armv6-m\libcr_eabihelpers.a)memcpy.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_appexit.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_flen.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_istty.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_read.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_readc.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)__sys_seek.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)_cr_sbrk.o
(c:/nxp/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv6-m\libcr_semihost.a)_cr_check_heap.o
Finished building target: Sensormodul.axf


Hope that helps!
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Feb 14 01:37:08 MST 2014
Either post as plain text (in between CODE markers) or attach it as a text file.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Thu Feb 13 15:28:05 MST 2014
Sadly my post triggered the Spam Filter. Did you receive it anyways? Or where can I send you the requested information?
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Feb 13 14:23:44 MST 2014
Can you please link, with the verbose option and post the output. Also, please post the map file.

0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HaukeR on Thu Feb 13 13:44:04 MST 2014

Quote: TheFallGuy
They all look like random data to me. Did you mess with the linker script?



Actually I posted a not so smart excerpt, the commands before and after were actually pieces of code that made sense (the fragments here, were actually data (which should be loaded by the ldr command, if you look closely)

I used the managed linker script, so i did not change a thing on them.


Quote:
This looks like you are trying to link in some code built for ARM state. But LPC1115 is Thumb only.



As said above, i used the managed linker script option, so it was generated automatically. I once had such a bug on the LPC1114, where the auto-generated linker script actually linked in some ARM instructions. I found a bug fix for that on the web (can't remember how it worked out in the end).

Can this be a similar issue?
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Feb 13 12:53:57 MST 2014
This looks like you are trying to link in some code built for ARM state. But LPC1115 is Thumb only.

Regards,
LPCXpresso Support.
0 Kudos

1,061 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Feb 13 12:34:04 MST 2014
They all look like random data to me. Did you mess with the linker script?
0 Kudos