embedded-linux

Continuous Integration/ Unit testing in embedded C++ systems

一个人想着一个人 提交于 2019-12-03 11:42:58
问题 What tools are generally used for unit testing and especially continuous integration for embedded systems? I am especially thinking that you usually have to cross-compile and deploy, and also that you can't easily visualize the target platform. Also it can be difficult to run test-code and frameworks. What could I use too alleviate these difficulties? (I think it should be some kind of dual targeting, where the build server runs its tests on a easier target) 回答1: For unit testing, take a look

What is the difference between the firmware and the operating system?

旧时模样 提交于 2019-12-03 11:40:29
问题 In embedded devices such as printer, switches, I am confused what the difference between the firmware and the operating system is. Are embedded devices operating systems similar to PCs (Linux and Windows)? For example, I have a printer which has an embedded web server that allows me to manage the printer remotely. When I open the manufacturer website, I find that the OS is: OS 9.86. What kind of OS is this? See: Phaser 8560 Support & Drivers 回答1: Firmware refers to a small piece of code that

loading u-Boot in memory instead of flashing it

六月ゝ 毕业季﹏ 提交于 2019-12-03 09:53:44
问题 In my ARM based custom board, I flash u-boot to NAND whenever I do changes on that. (putting some debug statements/modification). Is there any way to directly load the uboot image in RAM memory instead of flashing it every time? For linux kernel image I do load it in memory and use bootm to boot that image. Similarly for u-boot I am trying out. Kindly provide your suggestions. 回答1: Someone at Freescale has done this, for their P1022DS evaluation system (and some others as well). They have

u-boot : Relocation

北战南征 提交于 2019-12-03 09:08:52
问题 This one is a basic question related to u-boot. Why does the u-boot code relocate itself ? Ok, it makes sense if u-boot is executing from NOR-flash or boot ROM space but if it runs from SDRAM already why does it have to relocate itself once again ? 回答1: This question comes up frequently. Good answers sometimes too. I agree it is handy to load the build to SDRAM during development. That works for me, I do it all the time. I have some special boot code in flash which does not enable MMU/cache.

How to use bluetoothctl like hcitool lescan to report repeated proximity beacons

北城余情 提交于 2019-12-03 09:02:56
问题 I can use hcitool lescan with the --duplicates flag to capture periodic LE Advertising Reports (proximity beacons) from two nearby BLE devices: $ sudo hcitool lescan --duplicates LE Scan ... C8:0F:10:29:4D:98 MI1S C8:0F:10:29:4E:75 MI1S C8:0F:10:29:4E:75 MI1S C8:0F:10:29:4D:98 MI1S C8:0F:10:29:4E:75 MI1S C8:0F:10:29:4D:98 MI1S <snip> Here is that scan again, with timestamps added to show the periodicity: $ sudo stdbuf -i0 -o0 -e0 hcitool lescan --duplicates | perl -nle 'print scalar(localtime

Tool to visualize the device tree file (dtb) used by the Linux kernel?

孤者浪人 提交于 2019-12-03 08:58:36
问题 I am looking for a tool which can graphically represent the hardware device tree used in linux kernel. I am trying to understand linux kernel for particular arm chipset. It would be a really useful tool to have. 回答1: You can try the Component inspector tool. It is part of QorIQ Configuration Suite which is a plugin for Eclipse. Download here . (Requires registration. Free to download.) Personally as i am on the cmd-line most of the time, and quite addicted to vi , i find its built-in code

How to modify kernel DTB file

Deadly 提交于 2019-12-03 07:14:43
Summary I am currently compiling the Linux kernel (kernel, modules and DTB) with some custom drivers for a custom board. Occasionally I'll compile the kernel and realize that the compatibility string in the DTB file is not what the custom driver is looking for. Right now the only way i can remedy this is modify the DTS or kernel driver so the strings match and then recompile the kernel again. Is there are way I can just edit the DTB file to update the compatibility string? Failed Attempts I have been able to decompile the DTB file back to a DTS file using the command: dtc -I dtb -o <filename>

Volatile and its harmful implications

旧城冷巷雨未停 提交于 2019-12-03 07:05:56
I am a embedded developer and use volatile keyword when working with I/O ports. But my Project manager suggested using volatile keyword is harmful and has lot of draw backs, But i find in most of the cases volatile is useful in embedded programming, As per my knowledge volatile is harmful in kernel code as the changes to our code will become unpredictable. There are any drawbacks using volatile in Embedded Systems also? No, volatile is not harmful. In any situation. Ever. There is no possible well-formed piece of code that will break with the addition of volatile to an object (and pointers to

How to interpret /proc/mounts?

人盡茶涼 提交于 2019-12-03 05:47:27
问题 When i do the following. "cat /proc/mounts". tmpfs /export/ftp/import tmpfs rw,relatime,size=102400k 0 0 tmpfs /export/ftp/export tmpfs rw,relatime,size=10240k,mode=755 0 0 The documentation of embedded device said that import and export are located in DRAM However in other equipment ubi18_0 /nvdata1/temporary-download ubifs rw,sync 0 0 ubi18_0 /export/ftp/import ubifs rw,sync 0 0 ubi18_0 /export/http/import ubifs rw,sync 0 0 tmpfs /export/ftp/export tmpfs rw,size=10240k,mode=755 0 0 The

how to know the Interrupt/GPIO number for a specific pin in linux

依然范特西╮ 提交于 2019-12-03 04:34:56
问题 i'm doing a project in which i need to handle an interrupt in Linux. the board i'm using is an ARM9Board based on the s3c6410 MCU by Samsung (arm 11 processor) and it has the following I/O interface : as the image shows i have EINTx pins for external interrupts and GPxx pins as GPIO pins and i don't mind using any of them but i don't have their numbers ! For EINTx pins : when i call int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *), unsigned long flags, const char