embedded

How to make bare metal ARM programs and run them on QEMU?

*爱你&永不变心* 提交于 2019-11-29 15:15:18
I am trying to get this tutorial to work as intended without success (Something fails after the bl main instruction). According to the tutorial the command (qemu) xp /1dw 0xa0000018 should result in the print 33 (But i get 0x00 instead) a0000018: 33 This is the content of the registers after the main call (see startup.s) (qemu) info registers R00=a000001c R01=a000001c R02=00000006 R03=00000000 R04=00000000 R05=00000005 R06=00000006 R07=00000007 R08=00000008 R09=00000009 R10=00000000 R11=a3fffffc R12=00000000 R13=00000000 R14=0000003c R15=00000004 PSR=800001db N--- A und32 FPSCR: 00000000 I

GreenHills - small data area overflow

徘徊边缘 提交于 2019-11-29 15:05:47
I'm hoping maybe someone has a quick answer for this but essentially when I turn on optimizations, I get the following error: [elxr] (error) small data area overflow: 0xfff9f6fc (signed) didn't fit in 16 bits while performing relocation in file test_main.o at location __sti___13_test_main_cpp_252229d3+0xc, to reference symbol oe_init_intconn A similar error occurs when I put in this linker directive as well: -auto_sda Their manual doesn't make any mention of this linker error. I'm using Integrity 5.10 This linker error is usually not related to the -Olink optimization -auto_sda . The linker

C++ or C# to program mobile barcode device?

冷暖自知 提交于 2019-11-29 14:33:02
问题 I will be developing some applications using mobile barcode scanners and need to choose between C++ and C# for coding on the scanners. I am considering Intermec's CK31 or similar for the combination of wifi, scanning choices, programmability and user interface options. It runs Windows CE .NET 4.2 according to their spec sheet. Intermec's Developer Library comes with .Net and C++ SDKs. My previous Win CE 2003 experience is in C++ (MFC GUI, sockets and serial comms). I'm comfortable in C# with

Resources for memory management in embedded application

风流意气都作罢 提交于 2019-11-29 14:29:38
问题 How should I manage memory in my mission critical embedded application? I found some articles with google, but couldn't pinpoint a really useful practical guide. The DO-178b forbids dynamic memory allocations, but how will you manage the memory then? Preallocate everything in advance and send a pointer to each function that needs allocation? Allocate it on the stack? Use a global static allocator (but then it's very similar to dynamic allocation)? Answers can be of the form of regular answer,

Dynamic memory allocation in embedded C

谁说我不能喝 提交于 2019-11-29 13:02:12
Can I use functions malloc and delete in embedded C? For example, I have one function, where was created pointer on structure with function malloc. This function return address in ram and I can use this . After exit from my function, where memory was allocated, this pointer will be deleted or this memory reserved for this, while not will be function delete terminated ? Typedef struct { Char varA; Char varB } myStruct ; Void myfunc ( void) { myStruct * ptrStruct = ( myStruct *) malloc ( sizeof (myStruct)) ; // Code here //........ return ; } Yes, you can use malloc in embedded C. Some embedded

Multiply defined linker error using inlined functions

蹲街弑〆低调 提交于 2019-11-29 12:47:06
The linker is reporting multiply defined errors for an inline function. I have the following code in a header file: struct Port_Pin { volatile uint32_t * port_addr_set_value; //!< Writing the pin value here sets the pin to high. volatile uint32_t * port_addr_clr_value; //!< Writing the pin value to this port clears the pin to low. volatile uint32_t * port_addr_read_value; //!< Address to read pin value. volatile uint32_t * port_addr_enable; //!< Writing the pin value here enables the pin (for reading or writing). volatile uint32_t * port_addr_disable; //!< Writing the pin value here disables

Linking binary against functions/data in specific location in memory

我的梦境 提交于 2019-11-29 12:41:41
I'm currently in the process of writing an intermediate-memory bootloader for an ATMega. I'd like to place a section of commonly used functions and data in a specific location in memory, such that: limited size of the bootloader section is not overcome library functions, drivers, etc, are not reproduced by the application section and thus wasting space For illustrative purposes, a map of the desired memory layout is below: Following some help in this thread on avrfreaks, I'm to the point where I've been able to move all code (in my bootloader + library development environment - applications

How are floating point operations emulated in software? [closed]

吃可爱长大的小学妹 提交于 2019-11-29 12:37:46
How does software perform floating point arithmetic when the CPU has no (or buggy) floating point unit? Examples would be the PIC, AVR, and 8051 microcontrollers architectures. "Emulated" is the wrong term in the context of PIC, AVR and 8051. Floating-point emulation refers to the emulation of FPU hardware on architectures that have an FPU option but for which not all parts include the FPU. This allows a binary containing floating point instructions to run on a variant without an FPU. Where used, FPU emulation is implemented as an invalid-instruction exception handler ; when an FPU instruction

call to request_mem_region() fails

情到浓时终转凉″ 提交于 2019-11-29 12:30:00
The start address 0x4806E000 (UART4 base address) is already present in /proc/iomem with the name omap4-uart. How to disable the memory regions already allocated ?. Edit : Even though request_mem_region is successful the console during booting shows this messages. [ 0.758514] Serial: 8250/16550 driver, 3 ports, IRQ sharing enabled [ 0.760040] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0 [ 0.760498] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1 [ 0.760955] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2 [ 1.778808] console [ttyO2]

Does lwIP support Zeroconf?

自古美人都是妖i 提交于 2019-11-29 12:19:02
问题 I see that lwIP has some AutoIP (aka IPv4LL, aka RFC 3927) code, but I can't tell if it does anything higher up in the Zeroconf stack, namely mDNS and DNS-SD (with RFC 2782). So, does lwIP support DNS-SD service discovery? If not, would it be easy to port code from a project like Avahi that does (assuming licensing allows it)? 回答1: No, lwIP does not support any part of Zeroconf except AutoIP. I've not looked at Avahi but porting Apples mDNSResponder to lwIP is quite straightforward. There is