Author |
Message |
Forum: Programming Topic: Let peripheral register word access |
maolj |
Posted: Wed Jul 06, 2016 2:16 pm
|
|
Replies: 0 Views: 17084
|
For peripheral register, we usually define bitfield data struct for its elements, and define a global variable which use a pointer point to the base address. but sometimes peripheral register can only be read, write by 32 bit format, so we need avoid compiler to generate bit field access instruction... |
|
|
Forum: Programming Topic: how to use madds64 instruction |
maolj |
Posted: Thu Jun 30, 2016 7:29 pm
|
|
Replies: 0 Views: 16916
|
Andes madds64 instruction: [ madds64 Dt, ra, rb ] that multiply the signed integer contents of two 32-bit registers and add the multiplication result to the content of a 64-bit data register( Dx register ). Write the final result back to the 64-bit data register. you can check the NOD field of Misc.... |
|
|
Forum: Programming Topic: how to use mulr64 instruction |
maolj |
Posted: Thu Jun 30, 2016 6:04 pm
|
|
Replies: 0 Views: 16680
|
Andes mulr64 instruction: [ mulr64 rt, ra, rb ] that multiply the unsigned integer contents of two 32-bit registers and write the 64-bit result to an even/odd pair of 32-bit registers. if you want to use this instruction, you can programming code as below: #include <stdio.h> #include <stdlib.h> long... |
|
|
Forum: AndeSight MCU/RDS Topic: 如何將library file加入makefile dependency |
maolj |
Posted: Fri May 06, 2016 10:38 am
|
|
Replies: 2 Views: 22954
|
about how to use the static library.
1: link the static library, in this case the library name is liblibzzz.a, so just type libzzz, just like if you want to link libm.a, you just need type m.
2: add the search path
Attachment:
library-search-path.png [ 66.97 KiB | Viewed 21903 times ]
|
|
|
Forum: AndeSight MCU/RDS Topic: Share the c file that use the static library |
maolj |
Posted: Wed Jan 28, 2015 6:21 pm
|
|
Replies: 1 Views: 18337
|
let us see the building process. it will like below
Attachment:
share-file.png [ 140.71 KiB | Viewed 18301 times ]
|
|
|
Forum: Programming Topic: disable ex9 optimization |
maolj |
Posted: Wed Jan 28, 2015 3:48 pm
|
|
Replies: 0 Views: 18669
|
If you do not want to apply EX9 optimization at link time, use “-Wl,--mno-ex9” (gcc as linker)or “--mno-ex9” (ld as linker) to disable it.
below show a example when gcc as linker
Attachment:
disable-ex9.png [ 83.08 KiB | Viewed 18669 times ]
|
|
|
Forum: BSP (Board Support Package) Topic: let output normally at baudrate : 115200 |
maolj |
Posted: Tue Jan 27, 2015 2:32 pm
|
|
Replies: 1 Views: 16037
|
tiny modify current uart code to let output normally at baudrate : 115200 that's also work for buadrate 38400, 57600.
Attachment:
uart1.jpg [ 110.16 KiB | Viewed 16037 times ]
you can reference source code: uart.c from attached project. |
|
|
Forum: AndeSight MCU/RDS Topic: Patch AndeSight 201 MCU or AndeSight 200 STD with BSP321 |
maolj |
Posted: Thu Jan 22, 2015 3:41 pm
|
|
Replies: 0 Views: 19093
|
How to patch AndeSight 201 MCU or AndeSight 200 STD with BSP321
Attachment:
bsp321-1.png [ 235.59 KiB | Viewed 19093 times ]
|
|
|
Forum: AndeSight MCU/RDS Topic: export project |
maolj |
Posted: Mon Jan 19, 2015 12:18 pm
|
|
Replies: 0 Views: 19613
|
how to export project.
Attachment:
export.png [ 168.16 KiB | Viewed 19613 times ]
|
|
|
Forum: Programming Topic: specify an function to absolute address and LMA equ VMA |
maolj |
Posted: Mon Jan 12, 2015 12:14 pm
|
|
Replies: 0 Views: 18394
|
specify an function to absolute address and LMA equ VMA c code: /* * patchprog.c * */ int func2(int) __attribute__ ((section (".FUNC_PATCH"))); int func2(int x){ return x*100; } int main() { func2(100); return 0; } sag code: USER_SECTIONS .FUNC_PATCH REG1 0x0 0x10000 { EXEC1 0x0 0x10000 { ... |
|
|
Sort by: |