embedded

Cross-compiling mono for proprietary ARM device

戏子无情 提交于 2019-11-28 11:41:56
Currently at work, we are developing software for some arm-elf little endian devices. We are currently doing this in plain C, which is a pain. Luckily for us the company who creates the devices provide c++ support, unfortunatly that same company has messed up the c++ libraries so the project fails at linker-stage of compilation, yay! So lately i've been looking at alternatives, and the most interesting alternative is mono. I can see that compiling mono for arm is mostly done in scratchbox, and this seems like a good alternative. But i can also see that i need to setup rootfs that resembles my

End of response to an AT command

喜夏-厌秋 提交于 2019-11-28 09:18:56
问题 How to be sure what is end of an AT command send to GSM module? I need some character or string that represent end of AT command for every case due to finding when whole response is received. I guess it have something with "\r\n" sequence but, this sequence could be at the beginning of AT command response? 回答1: Like you suppose it's \r\n . This defines the end of a line. And it makes only sense to process complete lines. Some commands respons with only OK\r\n , some with some data. So you

GreenHills - small data area overflow

爷,独闯天下 提交于 2019-11-28 08:56:09
问题 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

Sqlite on an embedded system

巧了我就是萌 提交于 2019-11-28 08:42:46
I have a database file that is generated on a PC using Sqlite. This file is then transferred to an ARM7 based embedded system without an operating system. The embedded system must access this database, but does not need to update it. I have been trying to get sqlite3 small enough for the embedded system, but so far I cannot get the application size under 256 Kbytes (my limit). Has anyone been able to get sqlite3 down to this size? Is there other software that I can use to read this database? EDIT: I am trying to access the database using C. This would be done using the sqlite3_exec() function.

Initializing SD card in SPI issues

守給你的承諾、 提交于 2019-11-28 07:42:55
I've had a look at Stack Overflow question Initialization of a microSD card using an SPI interface and didn't see any answers that matched my issue (that is, things I haven't already tried). I have a similar issue where I'm trying to access a SD card through a microcontroller's SPI interface (specifically an HC908 ). I've tried following the flow charts in the Physical Layer Simplified Specification v2.00 and it seems to initialize correctly on Transcend 1 GB & 2 GB and an AE&C 1 GB card. But I'm having problems on three other random cards from my stash of old cards that I've used on my camera

Dynamic memory allocation in embedded C

…衆ロ難τιáo~ 提交于 2019-11-28 06:45:45
问题 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

call to request_mem_region() fails

馋奶兔 提交于 2019-11-28 06:07:52
问题 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

Multiply defined linker error using inlined functions

假如想象 提交于 2019-11-28 06:07:44
问题 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

Linking binary against functions/data in specific location in memory

試著忘記壹切 提交于 2019-11-28 06:06:54
问题 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

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

眉间皱痕 提交于 2019-11-28 05:27:20
问题 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