问题标签 [uclinux]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
4239 浏览

c++ - 我可以在 uclibc linux 上使用 boost 吗?

有没有人有在基于 uclibc 的系统上运行使用 boost 库的 C++ 应用程序的经验?甚至可能吗?你会使用哪个 C++ 标准库?uclibc++ 可以与 boost 一起使用吗?

0 投票
6 回答
10304 浏览

embedded - arm-linux-gcc 与 arm-elf-gcc

我正在查看使用 arm-linux-xxx 构建内核的 uClinux 系统,但使用 arm-elf-xxx 构建用户应用程序。

如果这些应用程序旨在在 linux 上运行,那么使用 arm-linux-xxx 构建所有内容不是更好吗?

在整个 uClinux 构建配置中在哪里设置该选项?

0 投票
1 回答
517 浏览

arm - 执行预加载在闪存 NOR 中的代码

我正在构建一个在 NXP LPC2478 上运行的 uClinux 系统。该芯片具有 512k 板载快速闪存,可以直接执行代码。我想从常规的外部 SDRAM 加载和运行用户应用程序。但是我有一个特殊的图形库,我想预先加载它以在板载闪存之外执行。

有没有办法编译图形库以在内存中的固定位置(闪存)运行,然后编译/链接使用它的应用程序以将其对该库的所有引用固定到闪存中的适当位置?

如果我必须编写一个手动进行修复的自定义应用程序加载器,我会这样做。

0 投票
2 回答
481 浏览

embedded - 在 RAM 中附加 ROMFS 是什么意思?

我正在为运行 uClinux 2.4 的 ARM 平台构建内核,在 Linux 配置的“常规设置”下,有一个名为“ m68knommu-style attach romfs in RAM support ”的选项。我的 ARM 组装技能有些有限,但据我所知,如果我启用此选项,ROMFS 将被复制到内核 BSS 的末尾。

这样做的目的是什么?

0 投票
4 回答
24371 浏览

linux - 如何获取 linux 实用程序 tail 的源代码?

这个命令真的很有用,但是我可以从哪里得到源代码来看看里面发生了什么。

谢谢 。

0 投票
4 回答
3209 浏览

c++ - ctags does not parse stdio.h properly

I am trying to use ctags with VIM, and I am a newbie to both. In order to test the extent to which ctags could be useful I decided to put it through a very simple test, namely to parse the headers in /usr/include so that I could autocomplete some very basic functions.

When I run the command

then the output prints

so clearly ctags missed some very obvious functions like fopen, yet it included functions like fclose. Is there some option I am missing when I am parsing with ctags?

0 投票
1 回答
203 浏览

hardware - 在 Coldfire/ucLinux 上对 PIO 进行 Bitbanging

这是问题所在:我需要通过 PIO 的 2 个引脚(1 个时钟,1 个数据)对一些硬件进行编程。时序限制很严格——10ms 时钟周期时间。当然,这一切都是在我维护非常高级别的服务(CAN 总线、TCP/IP)的同时。下游单元还通过将配置为输入的 PIO 引脚置为高电平来确认。所以这个循环必须读写。我需要在串行流中发送 16 位。

有没有一种既定的方法来做这种事情,或者我应该让硬件人员添加一个 PIC 或类似的东西。

在这个阶段,我更愿意避免像 RTAI 扩展这样的外来事物。我确实曾经看到过对用户模式 ​​IO 的引用,它暗示了一个可能的中断驱动驱动程序,但忘记了它。

欢迎任何指点。

0 投票
5 回答
37133 浏览

c - Lock a mutex multiple times in the same thread

I'm developing an application on an embedded linux OS (uClinux) and I need to be able to lock the mutex more than once (by the same thread).

I have a mutex and a mutexattr defined and initialized as follows:

But when I try to acquire the lock twice it blocks on the second lock:

Am I initializing it wrong or is there a better way of accomplishing the same?

Thanks in advance.

Conclusions:

  • Apparently PTHREAD_MUTEX_RECURSIVE or PTHREAD_MUTEX_RECURSIVE_NP don't work so I can't create a reentrant mutex.
  • try_lock is no good either. It acquires the lock if it can and returns an error if it can't acquire the lock. Unfortunately the error just informs me that the mutex is already in use and I can´t find out if the current thread already owns the lock or not.
  • pthread_mutex_lock can return an error if the current thread has the lock but for that I need to create a mutex of the type PTHREAD_MUTEX_ERRORCHECK, and I can't create one either.
0 投票
1 回答
707 浏览

linux - 将 Olson 时区文件转换为 TZ 环境变量

我们使用“America/New_York”约定让用户选择时区,但在我们的资源受限系统中,我们必须手动提供实际的 TZ 变量。例如,对于纽约,我们有:

但是,我们发现提供这些环境设置的资源只有美国所有地区的一个子集,我正在尝试构建其余的资源。例如,我需要构建America/Kentucky/LouisvilleAmerica/Boise

是否有此构建的资源,或者可以将 Olson 约定转换为 TZ 环境变量的现有脚本?我用谷歌搜索了一段时间,找不到任何东西(并且对自己实现逻辑感到紧张)。

TIA 迈克

0 投票
1 回答
1708 浏览

python - 将 python 包添加到 uClinux

我有 uClinux 的发行版,通过“菜单配置”我检查 python 并编译(“make”)。

我的芯片上现在有 python。有一个二进制可执行文件 /bin/python。

但是python包呢?只有一些基本的包,如 sys、time 等。我想为串口添加例如包 pyserial。

在编译之前,我可以在文件“setup”中的目录 /python/modules 中选择一些包。但是它们都在 C 中,我一般如何将 python 包添加到我的发行版中?

非常感谢您的任何想法。