arm-926ejs-linux-gnueabi-gcc -Wall -O3 -c -o xxx.o xxx.c
In file included from xxx.c:1:0:
xxx.h:63:18: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^
compilation terminated.
make: *** [xxx.o] Error 1
:) -Izlib-1.1.3 :)
arm-926ejs-linux-gnueabi-gcc -Wall -O3 -c -o xxx.o xxx.c
In file included from xxx.c:1:0:
xxx.h:63:18: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^
compilation terminated.
make: *** [xxx.o] Error 1
:) -Izlib-1.1.3 :)
// Program to Determine Host Byte Order
#include <stdio.h>
int main(int argc, char **argv) {
union {
short s;
char c[sizeof(short)];
}un;
un.s = 0x0102;
SNMP consists of three key components:
1- Managed Devices (Routers, Access Servers, Switches, Bridges, Hubs, Computer Hosts, or Printers...)
2- Agents (A software module that translates information into a compatible format with SNMP...)
3- Network Management Systems (Monitoring Applications)
Management Information Base (MIB) is a collection of information which is organized hierarchically.
Object Identifiers (OID) uniquely identify managed objects in an MIB hierarchy.
در حال تکمیل...
#define IMAGE_MAGIC 0x27051956 /* U-Boot Magic Number */
به چه کار آید؟
Cortex M4 |
e200z0 |
|
Memory Management/Protection Unit |
Y |
N |
Signal processing extension |
Y |
N |
Pipeline |
3-stage |
4-stage |
Branch unit processor |
Not explicit |
Y |
Integer divide cycles |
2 – 12 cycles |
5 – 34 cycles |
Endianness |
Little |
Big |
با استفاده از فرمان mtdparts، مقدیر kerneloffset و rootfsoffset را می توانیم بدست آوریم...
loadaddr، آدرسی فضایی در حافظه RAM است که داده های دریافتی به صورت موقت در آن ذخیره (بارگذاری) می شود.
print loadaddr
//
tftp $(loadaddr) uimage
// U-Boot automatically sets the variables fileaddr and filesize to the file address and file size of the last file that was loaded in RAM.
nand erase $(kerneloffset) $(kernelsize )
بهتر است کل پارتیشن را پاک کنیم... بنابراین باید مقدار kernelsize را از خروجی فرمان mtdparts بدست می آوریم...
nand erase.part linux
nand write $(fileaddr) $(kerneloffset) $(fileaddr)
nand write ${fileaddr} linux ${filesize}
اوریجینالشو خوب اومده!
تو شرکت... یهویی سیستمم می رفت هوا !... تمام کارام نابود می شد!... Blue Screen of Death...
کسی هم دنبال علتش نبود... یعنی براشون مهم نبود... می گفتن مشکل از درایور یا بورد...
هیچ ارزونی بی علت نیست...
Warning Notice:
Please be warned that counterfeit (fake) PL-2303HX (Chip Rev A) USB to Serial Controller ICs using Prolific's trademark logo, brandname, and device drivers, were being sold in the China market...
http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41
فرجام نافرجام بورد رَدِکسا... Radxa Rock... یک انتخاب اشتباه! کلاً به چینی ها نباید اعتماد کرد...
لایه فیزیکی اترنت دارای 4 زیرلایه می باشد. این لایه ها عبارتند از:
Physical Layer Signaling (PLS)
Attachment Unit Interface (AUI)
Medium Attachment Unit (MAU)
Medium Dependent Interface (MDI)
لایه MDI، مشخصات فیزیکی و الکتریکی واسط (Interface) شبکه را مشخص می کند...
MDI ports connect to MDIX ports via straight-through twisted pair cabling; both MDI-to-MDI and MDIX-to-MDIX connections use crossover twisted pair cabling.
https://en.wikipedia.org/wiki/Medium-dependent_interface
...
Kernel panic - not syncing: Requested init /linuxrc failed (error -2).
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-XXX #3
Hardware name: Freescale MXS (Device Tree)
[<c0015610>] (unwind_backtrace) from [<c001293c>] (show_stack+0x10/0x14)
[<c001293c>] (show_stack) from [<c00748bc>] (panic+0x98/0x208)
[<c00748bc>] (panic) from [<c047c31c>] (kernel_init+0x78/0xe4)
[<c047c31c>] (kernel_init) from [<c000ff50>] (ret_from_fork+0x14/0x24)
Rebooting in 1 seconds..
یک برنامه خوداتکا (Stand-Alone Program)، به برنامه رایانه ای اشاره دارد که برای اجرا به هیچ ماژول، تابع یا برنامه خارجی نیاز ندارد و به عبارت دیگر روی سخت افزاری فاقد سیستم عامل (ماشین لخت - Bare Machine) قابل اجراست. به عنوان مثال، برخی از برنامه هایی که برای پارتیشن بندی و فرمت کردن دیسک استفاده می کنیم، مانند Paragon Drive Backup...
همه چیز درسته، شما فقط لازمه فلان تغییر رو تو کد بدید! این هم از کد، این هم پروگرمر...
تو می مونیو یه کد و یه پورت... دو هفته سر کاری... همه هم شاکی... خودتم گیج...
The flags field indicates what UDP checksum policy that should be used for a UDP session. This can be either to switch UDP checksumming off completely, or to use UDP Lite in which the checksum covers only parts of the datagram...
// main.c
static void vSetupIFTask (void *pvParameters) {
...
while (1) {
physts = lpcPHYStsPoll();
if (physts & PHY_LINK_CHANGED) {
if (physts & PHY_LINK_CONNECTED) {
tcpip_callback_with_block((tcpip_callback_fn) netif_set_link_up, (void *) &lpc_netif, 1);
}
else {
tcpip_callback_with_block((tcpip_callback_fn) netif_set_link_down, (void *) &lpc_netif, 1);
}
vTaskDelay(configTICK_RATE_HZ / 4);
}
}
}
اصولاً برای کار با آن و اجرای آن، ملزم به استفاده از سیستم عامل (RTOS) یا فایل سیستمی نیستیم... خودش یک Task Scheduler داخلی دارد... یعنی به یک Timer نیاز دارد... به عبارت دیگر، Stand Alone... اما!!! چنانچه به سیستم عامل نیاز داشته باشیم... یعنی اگر تعدادی Task داشته باشیم... تنها می توانیم از سیستم عامل RTX استفاده کنیم...
Creating a Network Application!
تو شرکت...؟؟؟، از RL-ARM (MDK v4) استفاده می کردیم، در آنجا هدف گرفتن داده های سنسورهای محیطی، ذخیره آنها... یک سیستم Data logger بود... سرعت هم زیاد اهمیت نداشت...!
RL: Real-Time Library
اوایل کارم... پولی بود... Crackشم پیدا نمی شد...
Migrate RTX to CMSIS-RTOS RTX
هنگام شروع به کار با MDK-ARM Version 5.00، این مهاجرت اجباری است!
RTX5 (Keil RTX v5) supplies both API layers:
1- CMSIS-RTOS v1
2- CMSIS-RTOS v2