arm7

NAND logical bitwise operation in ARM

天涯浪子 提交于 2020-11-29 08:33:24
问题 Is there a way to perform a bitwise NAND operation on the bits in two registers in ARM7, either with the existing AND, OR and EOR operations or other instructions? 回答1: Sure; AND the two registers and then EOR the result with all 1's (for the negation). 回答2: and then mvn (move not). From GCC explorer int nand(int a, int b) { return ~(a & b); } nand(int, int): and r0, r0, r1 mvn r0, r0 bx lr 来源: https://stackoverflow.com/questions/21207561/nand-logical-bitwise-operation-in-arm

Why does ARM have 64KB Large Pages? [closed]

南笙酒味 提交于 2020-05-15 05:26:38
问题 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 3 years ago . The ARM720T user manual mentions small and large pages. Since the ARM 720T requires a 64KB page table entry to be duplicated 16 times in the page table, why not place 16 small page (4KB) entries to mimic a 64KB page entry instead of using a large page in the first place? 回答1:

What is non-aligned access? (ARM/Keil)

血红的双手。 提交于 2019-12-29 06:26:29
问题 I'm using Keil to write Assembly for ARM 7. I have the following runtime error: Non-aligned Access: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH Data Abort: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH This doesn't really help me, because I don't know what 'non-aligned access' is, (other than the obvious, but I don't really understand what it means) and I am trying to access (store) to 0x7F7F7F7F , what's the issue? Searching I only found a couple of similar issues,

ARM MOV and MVN operand

喜你入骨 提交于 2019-12-24 02:56:13
问题 I'm trying to write code to do two things: return a 1 to register r2 if my value is presentable as a constant in the ARM data processing instruction. This code does that (offer better methods if it's inefficient please). However, I also want to modify it to tell me whether a MOV or MVN needs to be used. AREA ArmExample18b, CODE ENTRY MOV r2, #0 ;register return value. if =1, representable, otherwise, not representable LDR r1, TABLE1 ;input value we want to use LDR r3, TABLE1+4 ;upper bound

Efficient floating point comparison (Cortex-A8)

时光总嘲笑我的痴心妄想 提交于 2019-12-12 08:49:12
问题 There is a big (~100 000) array of floating point variables, and there is a threshold (also floating point). The problem is that I have to compare each one variable from the array with a threshold, but NEON flags transfer takes a really long time (~20 cycles in accordance to a profiler). Is there any efficient way to compare these values? NOTE: As rounding error doesn't matter, I tried the following: float arr[10000]; float threshold; .... int a = arr[20]; // e.g. int t = threshold; if (t > a

Why does STR only work for addresses between 0x40000000 and 0x40003FFF?

陌路散爱 提交于 2019-12-08 10:44:35
问题 Code: dest EQU 0x40000000 AREA name, CODE, READONLY ENTRY MOV r0, #2 LDR r1, =dest STR r0, [r1] stop B stop END This code writes the value of 2 to memory location 0x40000000. When I change this to 0x20000000, 2 fails to get written there. Same thing with 0x3FFFFFFF. When I set the memory location to 0x40003FFF, 2 gets printed onto that location, but when I change the address to 0x40004000, 2 fails to get printed there. Same thing for any address locations higher, like 0x50000000. So according

How to compare and swap atomically in ARM7?

回眸只為那壹抹淺笑 提交于 2019-12-04 19:23:42
I would like to modify a global variable which is shared by different tasks and IRQ contexts in a RTOS. Therefore I need to modify this variable atomically. In my current implementation, I have been using enable_irq/disable_irq functions to modify the statement atomically. extern int g_var; void set_bit_atomic(int mask) { disable_irq(); g_var |= mask; enable_irq(); } I've found the __sync_bool_compare_and_swap function in GCC documentation as a helper for atomic operations. My current toolchain is KEIL MDK, and I would like to switch to the approach shown below, void set_bit_atomic(int mask) {

Apple Mach-O Linker Errors (20) - Undefined symbols for architecture armv7

爷,独闯天下 提交于 2019-11-30 11:01:13
问题 I received these errors after I added " -all_load " in the "Other Linker Flags" build setting once I added "libPusher-combined.a" and its header files. I followed the instructions exactly up to the part of typing in "-all_load" (under "Using a pre-compiled static library" in the "Adding to your iOS Project", but I ended up getting 20 Mach-O Linker errors. :/ Could anyone please help me with this? Here are the errors: Undefined symbols for architecture armv7: "_utf8_nextCharSafeBody",

Apple Mach-O Linker Errors (20) - Undefined symbols for architecture armv7

亡梦爱人 提交于 2019-11-29 23:01:14
I received these errors after I added " -all_load " in the "Other Linker Flags" build setting once I added "libPusher-combined.a" and its header files. I followed the instructions exactly up to the part of typing in "-all_load" (under "Using a pre-compiled static library" in the "Adding to your iOS Project", but I ended up getting 20 Mach-O Linker errors. :/ Could anyone please help me with this? Here are the errors: Undefined symbols for architecture armv7: "_utf8_nextCharSafeBody", referenced from: -[SRWebSocket _pumpScanner] in libPusher-combined.a(SRWebSocket.o) "_SCError", referenced from

Not allowing to use Constant defined in Objective C header file in swift class. Undefined symbols for architecture armv7

两盒软妹~` 提交于 2019-11-29 09:20:36
I created Objective C Header file . and added some properties in it. i declared static NSString* const kColor005C98 = @"005C98"; in Constants.h file I defined this file in Bridging-Header file as #import "Constants.h" Now when i want to use this property kColor005C98 in some swift file it failed the build and i am getting Undefined symbols for architecture armv7: "_kColor005C98", referenced from: i don't know what else i need to do so i don't get this error? (i have used this property in other objective C file successfully and no issue in that case) Update: As of Swift 2/Xcode 7 and later, a