embedded

Should I make stack segment large or heap segment large?

耗尽温柔 提交于 2019-12-24 17:35:11
问题 I'm programming a design for a microprocessor with very limited memory and I must use "a lot" of memory in different functions. I can't have a large stack segment, heap segment, data segment, I must choose which to make big and which to make small. I have about 32KB total, I use about 20KB for the text segment, that gives me 12KB for the rest. And I need a buffer of 4KB to pass to different functions (SPI Flash sector size). Where should initialize that large buffer? So my choices are: 1) If

How do i change the root password in the Yocto dora bitbake system?

不问归期 提交于 2019-12-24 14:40:59
问题 I am working on the Dora branch (Poky 1.2) of Yocto and need to work on this branch only. I need to change the blank root password to some other value in order to prevent a security hole in the image during development. How do I set the root password? I would like to use the local.conf file. The method described here does not work: How to set root password on Yocto / Poky image? 回答1: Add the below line in your build/conf/local.conf or go to your meta-dir and add the below line for taking git

How to disable/enable interrupts on a stm32f107 chip?

你说的曾经没有我的故事 提交于 2019-12-24 14:14:35
问题 I have an ARM stm32f107 chip. I'm porting a project from IAR to GCC IAR provides the following functions to enable and disable interrupts: #define __disable_interrupt() ... #define __enable_interrupt() ... How do I enable / disable interrupt for my chip using GCC? 回答1: I can't answer for ARM but the same function in Coldfire boils down to setting/clearing the Interrupt Priority Level masking register in the CPU. Setting it to the highest number disables/ignores all but non-maskable, setting

com.sun.net.httpserver.HttpHandler ClassNotFound Exception on Java Embedded Runtime Environment

牧云@^-^@ 提交于 2019-12-24 12:32:10
问题 i am trying to run restlet on an ejre. In eclipse with normal jre the code works absolutely fine, but in the ejre i get the following exception: java.lang.ClassNotFoundException: com.sun.net.httpserver.HttpHandler cannot be found I am using restlet v. 2.2.1. for jee and Java SE Embedded Runtime Environment (build 1.7.0_21-b11, headless) Java HotSpot Embedded Client VM (build 23.21-b01, mixed mode) I tried restlet v. 2.1. as mentioned in here but it did not work. Had someone a similar problem?

IAR define memory region for custom data

血红的双手。 提交于 2019-12-24 11:28:05
问题 I want to define a specific memory region in the STM32 micro where to store some strings. I'm using IAR compiler but I don't find a simple example that can help me to create the region in the correct way using the icf file. How can I create the region and use this region in the code? Thanks 回答1: I found this solution: In the icf file I define the memory region in this way: define region LANGUAGE_region = mem:[from 0x080FB000 to 0x080FC000]; "LANGUAGE_PLACE":place at start of LANGUAGE_region {

Why does not WiringPiISR block the main routine when it is fired?

流过昼夜 提交于 2019-12-24 11:15:51
问题 I am developing a program in C to run on a raspberry board. In the program i want to use WiringPiISR to handle a pin triggered interrupt. However, I have found that instead of blocking the main routine, the wiringPiISR creates a concurrent thread. Am i missing something? Minimal code example : #include <WiringPi.h> #include <unistd.h> int Check=0; void Isr() { while (1) { sleep(1); Check++; } } int main() { wiringPiSetup () ; pinMode(7, INPUT) ; wiringPiISR (7, INT_EDGE_BOTH ,&Isr); while (1)

Casting the results of a volatile expression to void

梦想的初衷 提交于 2019-12-24 11:08:24
问题 Note: This is Not the same thing that has been asked many times. Yes I have read the many many posts about casting to void. None of those questions resulted in the answer I suspect is true here. Background info: Embedded C. This is specifically related to memory mapped volatile pointers. In other words, peripheral registers. I came across the following line in a routine that involves writing to an I2C peripheral: (void) I2C1->SR2; I2C1 is #defined as a struct * to volatile memory. So the

How to read messages from GSM modem in Embedded C?

谁都会走 提交于 2019-12-24 10:57:55
问题 I am currently working on my mini-project under the domain "Internet of Things". I chose to design a wireless Notice board using a GSM module. I divided the project into two modules. First, the Arduino-LED board interface which perfectly completed. Second, GSM-Arduino interface. Basically, a message/SMS will be sent from the mobile phone to the GSM module and then we have to read that message from GSM module using Arduino. I am facing a problem here. The message is being sent to the GSM modem

creating task inside other task in freertos

对着背影说爱祢 提交于 2019-12-24 10:54:23
问题 I am an RTOS newbie and I am creating a simple real time system for automotive I am wondering if it possible to create a task inside another task. I tried to do this by the following method but it doesn't work. void vTask1 { *pvParameters){ unsigned portBASE_TYPE taskPriority; taskPriority=uxTaskPriorityGet( NULL ); char x; while (1){ x= 5 ; if (x==5) xTaskCreate( vTask2 , "task2", 1000, "task2 is running", taskPriority+5 , NULL ); } when I debug that code it hangs at xTaskCreate without

Can I get debug information on USB?

做~自己de王妃 提交于 2019-12-24 10:35:56
问题 Currently I am working on yocto OS for my project. My question regarding debug. In normal practice the debug information is entertained through serial. I aware about ssh debug. I have two question.... Why normally every device support debug on serial port? Is there any possible way to get debug through USB PORT(with out using serial to USB converter) in Yocto? 回答1: Because serial driver can be simple and implementing without interrupts (how Linux kernel console actually does). This is a