embedded

Mindset difference between workstation and embedded programmers [closed]

北城余情 提交于 2019-12-20 12:34:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . What do you think are the difference in mindset between a programmer doing work for a desktop environment (windows, linux, whatever...

What is the best c compiler for the Pic18 micro [closed]

我的梦境 提交于 2019-12-20 12:33:48
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . We are starting a new project based a microchip PIC18F252. What is the best 'c' compiler to use? 回答1: tech PICC has always been reliable for me and it has had many years of development. 回答2: Microchip C18 compiler: really the best and easiest to use. Perfect for professional

How to debug GCC/LD linking process for STL/C++

余生长醉 提交于 2019-12-20 12:33:17
问题 I'm working on a bare-metal cortex-M3 in C++ for fun and profit. I use the STL library as I needed some containers. I thought that by simply providing my allocator it wouldn't add much code to the final binary, since you get only what you use. I actually didn't even expect any linking process at all with the STL (giving my allocator), as I thought it was all template code. I am compiling with -fno-exception by the way. Unfortunately, about 600KB or more are added to my binary. I looked up

Data encapsulation in C

馋奶兔 提交于 2019-12-20 11:28:22
问题 I am currently working on an embedded system and I have a component on a board which appears two times. I would like to have one .c and one .h file for the component. I have the following code: typedef struct { uint32_t pin_reset; uint32_t pin_drdy; uint32_t pin_start; volatile avr32_spi_t *spi_module; uint8_t cs_id; } ads1248_options_t; Those are all hardware settings. I create two instances of this struct (one for each part). Now I need to keep an array of values in the background. E.g. I

Porting Python to an embedded system

拟墨画扇 提交于 2019-12-20 11:15:11
问题 I am working with an ARM Cortex M3 on which I need to port Python (without operating system). What would be my best approach? I just need the core Python and basic I/O. 回答1: There are a few projects that have attempted to port Python to the situation you mention, take a look at python-on-a-chip, PyMite or tinypy. These are aimed at lower power microcontrollers without an OS and tend to focus on slightly older versions of the Python language and reduced library support. 回答2: Golly, that's kind

Device Tree and manual registration

﹥>﹥吖頭↗ 提交于 2019-12-20 10:11:27
问题 I'm using Embedded Linux on a board that is mainly configured via the device tree mechanism ( .dts / .dtc files), i.e. entries in the device tree file indicate which devices to register and thereby which drivers to load. Is there a way to manually load a dynamic module in a way that resembles what would happen when this driver would be loaded by the device tree handler? To clarify: instead of having an entry for device XXX in my .dts file, can I "manually" register this device (for example by

Latitude Longitude in wrong format DDDMM.MMMM 2832.3396N

徘徊边缘 提交于 2019-12-20 10:05:16
问题 I have a gps module that gives me latitude in longitude in a weird format. DDDMM.MMMM As written on user manual, Degrees*100 + Minutes. As far as I know, It is degrees minutes seconds, and seconds is between 0-59, above than this will increment the minute. But this is giving minutes in decimal places. Does this means 1/1000th of a minute? eg. 07717.3644 E 077 --> degrees 17 --> minutes 3644 --> ? E --> Direction Also how will I convert it to decimal, I am using the formula decimal = degrees +

What is Test-and-Set used for?

。_饼干妹妹 提交于 2019-12-20 09:53:07
问题 After reading the Test-and-Set Wikipedia entry, I am still left with the question "What would a Test-and-Set be used for?" I realize that you can use it to implement Mutex (as described in wikipedia), but what other uses does it have? 回答1: You use it any time you want to write data to memory after doing some work and make sure another thread hasn't overwritten the destination since you started. A lot of lock/mutex-free algorithms take this form. 回答2: A good example is "increment." Say two

What is Test-and-Set used for?

耗尽温柔 提交于 2019-12-20 09:51:17
问题 After reading the Test-and-Set Wikipedia entry, I am still left with the question "What would a Test-and-Set be used for?" I realize that you can use it to implement Mutex (as described in wikipedia), but what other uses does it have? 回答1: You use it any time you want to write data to memory after doing some work and make sure another thread hasn't overwritten the destination since you started. A lot of lock/mutex-free algorithms take this form. 回答2: A good example is "increment." Say two

Emulating UART over USB

不羁岁月 提交于 2019-12-20 09:24:21
问题 Does anybody know if it's possible to emulate UART (simple serial transmit and receive) over USB? How would this be accomplished? I found this link on the Microchip website, but it's not very forthcoming. http://www.microchip.com/forums/m522571-print.aspx Any ideas? Thanks. 回答1: Basically you have two options to emulate UART over USB: Use an existing product. The company FTDI provides well known and solid UART-USB bridge chips, e.g. FT230X. Pro: You don't need any detailed knowledge about USB