embedded

Segmentation fault while running Qt Helloworld on embedded system

柔情痞子 提交于 2019-12-11 04:24:49
问题 I cross-compiled a Helloworld executable for ARM . It worked well on my friend's development board, but failed with a " segmentation fault " on my board. The two boards are slightly different in both hardware and software. My question is, how can I debug in my board? Is it relatively easy to debug such a simple program? Does it indicate that there's nothing wrong with the executable and the problem most probably lies in the filesystem of my board? Below is the code: #include <QApplication>

How to write to flash memory using inline assembly?

隐身守侯 提交于 2019-12-11 04:00:01
问题 I am using MPLAB C18 compiler with PIC18F87J11 and I am trying to save some values to flash memory, using inline assembly, which is a combination of C and assembly code. It looks like I can write and read to flash memory correctly, but as soon as I power cycle my PIC and then attempt to read what I previous saved from a specific address, I don't get the same value. I am saving 0x09 to 0xB22A address. Like I said, if I save the value then read it immediately, everything comes up correctly, but

What free tiniest flash file system could you advice for embedded system?

狂风中的少年 提交于 2019-12-11 03:49:51
问题 I've got DSP tms320vc5509a and NOR flash AT26DF321 on the board and I'm going to store named data on the flash. I don't need directory hierarchy, wear leveling (I hope system will write to flash very few times), but CRC is strongly needed. Thank you 回答1: You could look at the ELM-Petit FAT File System Module for an good small file system implementation. Not sure that it has CRC but you can add that to your low-level hardware drivers. 回答2: On a NOR flash, especially one that also contains my

Linking error when compiling Crypto++ for ARMHF

无人久伴 提交于 2019-12-11 03:06:43
问题 I'm trying to compile the crypto++ library to run for the armhf architecture. I'm following the method provided in this answer. I tweaked the setenv-embed.sh to match my system's configuration. The output of running . ./setenv-embed.sh is CPP: /usr/bin/arm-linux-gnueabihf-cpp CXX: /usr/bin/arm-linux-gnueabihf-g++ AR: /usr/bin/arm-linux-gnueabihf-ar LD: /usr/bin/arm-linux-gnueabihf-ld RANLIB: /usr/bin/arm-linux-gnueabihf-gcc-ranlib-4.8 ARM_EMBEDDED_TOOLCHAIN: /usr/bin ARM_EMBEDDED_CXX_HEADERS:

How to embed nibs programmatically?

烂漫一生 提交于 2019-12-11 03:05:54
问题 I have a UIViewController with an UIScrollView in it. Then I created a new UIView subclass with some properties that I want to programmatically add in this UIScrollView until my data ends. Something that should look like this picture: I have read other topics that does that by creating a view and setting its class to the custom view subclass, but I want to do it programmatically and its not working. how would I do that? 回答1: From your image it looks like you're looking to load views from a

What is the dataflow of using touchscreen with tslib?

雨燕双飞 提交于 2019-12-11 03:02:13
问题 I don't understand how tslib works. Let's say I have a serial touchscreen, in my understanding the data flows in the following way: ts press -> serial port -> ts driver -> tslib -> device file (like /dev/input/eventX) Is it right? Or do I need to insert some code between ts driver and tslib so that they can communicate? 回答1: Tslib does not operate between the touch screen driver and the input device file - it accesses the device file on behalf of the application using it. The key data flow

Debugging embedded system with Eclipse - HOW TO PRINT TO A LOGGING FILE?

不想你离开。 提交于 2019-12-11 02:55:33
问题 I'm currently working on a project on STM32F4 and I'm using Eclipse. I've got some problems with the program - it seems to have a random behavior - sometimes it works fine, other times it has some errors. Sometimes when I try do debug with breakpoints I get the beautiful HardFault Handler and it really messes with my brains. Sorry for the little off-topic paragraph, just wanted to let you know why I decided to use printing to a log file at some key moments in the program so I can see in which

How can I prevent the need to copy strings passed to a avr-gcc C++ constructor?

偶尔善良 提交于 2019-12-11 02:33:44
问题 In the ArduinoUnit unit testing library I have provided a mechanism for giving a TestSuite a name. A user of the library can write the following: TestSuite suite("my test suite"); // ... suite.run(); // Suite name is used here This is the expected usage - the name of the TestSuite is a string literal. However to prevent hard-to-find bugs I feel obliged to cater for different usages, for example: char* name = (char*) malloc(14); strcpy(name, "my test suite"); TestSuite suite(name); free(name);

FreeRTOS Hungarian Notation [duplicate]

北慕城南 提交于 2019-12-11 01:54:14
问题 This question already has answers here : what is v and x means in freeRTOS task creating or used in it? (2 answers) Closed 3 years ago . I'm a complete newbie in RTOS and C programming, and I'm still getting used to the C good practices yet. So I opened a project which uses FreeRTOS, and I notice that the OS files use the Hungarian Notation. I know the notation a little, but faced some new "standards" in the FreeRTOS.h file, which are: #ifndef configASSERT #define configASSERT( x ) #define

Why am I getting a namespace identifier error?

人走茶凉 提交于 2019-12-11 01:37:52
问题 I am using Keil uVision and I keep getting this error: C:\Keil_v5\ARM\ARMCC\bin\..\include\rw/_defs.h(781): error: #20: identifier "namespace" is undefined What could lead to this error? Isn´t namespace automatically defined? 回答1: It looks like you are using C compilation for C++ code - check the compiler options. In C++ namespace is a reserved word, but not in C, so the compiler will try to interpret it as an identifier rather than a keyword - which will then of course make no sense