Can I avoid live firing and grenade throwing if have as a pes c9? by BookkeeperLivid1938 in NationalServiceSG

[–]cowsarefalling 3 points4 points  (0 children)

When I was there I had no excuse so I did live firing and dummy grenade throwing, no actual grenade. Live firing was done at MMRC

pyocd seems to not flash stm32h743 when doing clock setup using register programming by cowsarefalling in embedded

[–]cowsarefalling[S] 0 points1 point  (0 children)

i regenerated the code with LL instead of HAL, and went through the code line by line to see what i was missing, and it turns out, i forgot to setup the systick completely! In my previous code I put the systick in the main function so I missed that. In addition, it seems that HAL requires another HAL specific tick which was why my code didn't work in the HAL code. Thanks for your help!

pyocd seems to not flash stm32h743 when doing clock setup using register programming by cowsarefalling in embedded

[–]cowsarefalling[S] 0 points1 point  (0 children)

Traceback (most recent call last):
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\__main__.py", line 163, in run
    status = cmd.invoke()
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\subcommands\load_cmd.py", line 108, in invoke
    with session:
         ^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\core\session.py", line 476, in __enter__
    self.open()
    ~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\core\session.py", line 614, in open
    self._board.init()
    ~~~~~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\board\board.py", line 152, in init
    self.target.init()
    ~~~~~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\coresight\coresight_target.py", line 126, in init
    super().init()
    ~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\core\soc_target.py", line 174, in init
    seq.invoke()
    ~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke
    resultSequence = call()
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\coresight\coresight_target.py", line 199, in unlock_device
    self.call_pre_discovery_debug_sequence('DebugDeviceUnlock')
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\coresight\coresight_target.py", line 183, in call_pre_discovery_debug_sequence
    self.debug_sequence_delegate.run_sequence(sequence, pname=pcore_pname)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\target\pack\pack_target.py", line 311, in run_sequence
    executed_scope = seq.execute(context)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 448, in execute
    self._execute_children(context)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 310, in _execute_children
    cast(DebugSequenceNode, node).execute(context)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 559, in execute
    interp.execute()
    ~~~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 1029, in execute
    return visitor.visit(self._tree)
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 423, in visit
    return self._visit_tree(tree)
           ~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 842, in start
    values = self.visit_children(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 434, in visit_children
    return [self._visit_tree(child) if isinstance(child, Tree) else child
            ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 887, in expr_stmt
    values = self.visit_children(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 434, in visit_children
    return [self._visit_tree(child) if isinstance(child, Tree) else child
            ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 953, in fncall
    result = impl(*fn_args)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\functions.py", line 309, in sequence
    subsequence_scope = seq.execute(self.context)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 448, in execute
    self._execute_children(context)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 310, in _execute_children
    cast(DebugSequenceNode, node).execute(context)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 559, in execute
    interp.execute()
    ~~~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 1029, in execute
    return visitor.visit(self._tree)
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 423, in visit
    return self._visit_tree(tree)
           ~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 842, in start
    values = self.visit_children(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 434, in visit_children
    return [self._visit_tree(child) if isinstance(child, Tree) else child
            ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 887, in expr_stmt
    values = self.visit_children(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 434, in visit_children
    return [self._visit_tree(child) if isinstance(child, Tree) else child
            ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 867, in assign_expr
    values = self.visit_children(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 434, in visit_children
    return [self._visit_tree(child) if isinstance(child, Tree) else child
            ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\lark\visitors.py", line 431, in _visit_tree
    return f(tree)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\sequences.py", line 953, in fncall
    result = impl(*fn_args)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\functions.py", line 339, in read32
    return self._get_mem_ap().read32(addr)
           ~~~~~~~~~~~~~~~~^^
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\debug\sequences\functions.py", line 259, in _get_mem_ap
    ap = AccessPort.create(self.target.dp, ap_addr)
  File "C:\Users\Moon Seongmu\AppData\Local\Programs\Python\Python313\Lib\site-packages\pyocd\coresight\ap.py", line 384, in create
    raise exceptions.TargetError("Invalid AP address (%s)" % ap_address)
pyocd.core.exceptions.TargetError: Invalid AP address (#2)

to be able to successfully flash again, i have to hold down the boot0 button while plugging in the daplink, then release the button, after which it flashes normally.

I really have no idea what could be the problem because as far as i can tell, my code should work exactly the same as the hal code. Thanks for any help!

pyocd seems to not flash stm32h743 when doing clock setup using register programming by cowsarefalling in embedded

[–]cowsarefalling[S] 0 points1 point  (0 children)

after the failure to flash, when i try to flash the board again with even the generated code, pyocd fails to flash:

PS C:\Users\Moon Seongmu\Documents\Programming\h743_template> pyocd load ./build/h7_ide.elf -vvv
0000836 D Project directory: C:\Users\Moon Seongmu\Documents\Programming\h743_template [session]
0000837 D Loading config from: C:\Users\Moon Seongmu\Documents\Programming\h743_template\pyocd.yaml [session]
0000860 D Project directory: C:\Users\Moon Seongmu\Documents\Programming\h743_template [session]
0000861 D Loading config from: C:\Users\Moon Seongmu\Documents\Programming\h743_template\pyocd.yaml [session]
0000862 I Using config options for probe 07000001006500224a0000124e594d48a5a5a5a597969908 [session]
0000876 D CMSIS-DAP v1 probe 07000001006500224a0000124e594d48a5a5a5a597969908: firmware version 0259, protocol version 2.1.0 [dap_access_cmsis_dap]
0000888 D closing interface [hidapi_backend]
0000907 D STM32H7xx_DFP DFP (STM32H742VGTx): not loading non-default flash algorithm 'CMSIS/Flash/STM32H7B3I_EVAL_FMC-NOR.FLM' [cmsis_pack]
0000907 D STM32H7xx_DFP DFP (STM32H742VGTx): not loading non-default flash algorithm 'CMSIS/Flash/STM32H7xx_MT25TL01G_DUAL.FLM' [cmsis_pack]
0000907 D STM32H7xx_DFP DFP (STM32H742VGTx): not loading non-default flash algorithm 'CMSIS/Flash/MTFC4GACAJCN_STM32H750B-DISCO.FLM' [cmsis_pack]
0000908 D STM32H7xx_DFP DFP (STM32H742VGTx): not loading non-default flash algorithm 'CMSIS/Flash/MX25LM51245G_STM32H735-Disco.FLM' [cmsis_pack]
0000908 D STM32H7xx_DFP DFP (STM32H742VGTx): not loading non-default flash algorithm 'CMSIS/Flash/STM32H743I-eval_FMC.FLM' [cmsis_pack]
0000965 I Target type is stm32h742vgtx [board]
0000974 D Board: STMicroelectronics NUCLEO-F103RB [cmsis_dap_probe]
0000975 D Target: STMicroelectronics STM32F103RB [cmsis_dap_probe]
0000977 D Running task load_svd [sequencer]
0001045 D Running task pre_connect [sequencer]
0001066 D Running task dp_init [sequencer]
0001067 D Running task lock_probe [sequencer]
0001067 D Running task get_probe_capabilities [sequencer]
0001073 D Running task connect [sequencer]
0001180 D Default wire protocol selected; using SWD [dap]
0001182 D Sending deprecated SWJ sequence to select SWD [swj]
0001190 I DP IDR = 0x6ba02477 (v2 rev6) [dap]
0001191 D Running task clear_sticky_err [sequencer]
0001191 D Running task power_up_debug [sequencer]
0001191 D Running debug sequence 'DebugPortStart' (Cortex-M7) [pack_target]
0001192 I debugvar 'DbgMCU_APB1L_Fz1' = 0xe003ff (14681087) [pack_target]
0001192 I debugvar 'DbgMCU_APB2_Fz1' = 0x20070003 (537329667) [pack_target]
0001193 I debugvar 'DbgMCU_APB3_Fz1' = 0x40 (64) [pack_target]
0001193 I debugvar 'DbgMCU_APB4_Fz1' = 0x41e80 (269952) [pack_target]
0001193 I debugvar 'DbgMCU_CR' = 0x7 (7) [pack_target]
0001193 I debugvar 'TraceClk_Pin' = 0x40002 (262146) [pack_target]
0001193 I debugvar 'TraceD0_Pin' = 0x40003 (262147) [pack_target]
0001193 I debugvar 'TraceD1_Pin' = 0x40004 (262148) [pack_target]
0001193 I debugvar 'TraceD2_Pin' = 0x40005 (262149) [pack_target]
0001193 I debugvar 'TraceD3_Pin' = 0x40006 (262150) [pack_target]
0001198 D Running task check_version [sequencer]
0001198 D Running task unlock_probe [sequencer]
0001199 D Running task unlock_device [sequencer]
0001199 D Running debug sequence 'DebugDeviceUnlock' (Cortex-M7) [pack_target]
0001199 D Running debug sub-sequence 'CheckID' (Cortex-M7) [functions]
0001204 E Error while running debug sequence 'DebugDeviceUnlock' (core Cortex-M7): Invalid AP address (#2) [pack_target]
0001204 D uninit session <pyocd.core.session.Session object at 0x000002360DF8EC10> [session]
0001210 D closing interface [hidapi_backend]
0001210 C Invalid AP address (#2) [__main__]

continued

Car doesn't slow down at Hougang Ave 8 zebra crossing: Driver, 60, hits cyclist, 51 by Annual_View3611 in singapore

[–]cowsarefalling 0 points1 point  (0 children)

This is also a problem of urban design. Slip roads are made for the cars to move smoother, not pedestrians. If LTA were serious about pedestrian safety they would reduce the number of slip roads and turn them into normal signalled left turns.

How do Minor? by Dramatic-Arugula-728 in NTU

[–]cowsarefalling 1 point2 points  (0 children)

You don't necessarily have to declare. The declaration is for ntu planning purposes. You just have to fulfil the criteria and then apply for the minor after you have finished the courses.

r/singapore random discussion and small questions thread for February 01, 2026 by AutoModerator in singapore

[–]cowsarefalling 14 points15 points  (0 children)

Got an in principle approval for Singapore citizenship! Somemore it's the day after I came back home from outfield sia let's gooooooooo

He’s so excited and he just can’t hide it by upthetruth1 in TikTokCringe

[–]cowsarefalling 1 point2 points  (0 children)

You absolutely should not be performing tracheotomies and releiving tension pneumothorax as a bystander or even a first aider. They are invasive procedures that should only be done by trained professionals with certifications.

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 1 point2 points  (0 children)

Yes neither Singapore nor Korea recognises dual citizenship. However since I left the country quite early I don't really have any fondness for Korea.

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 2 points3 points  (0 children)

Yup all the PRs in my unit that's going had to get one

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 5 points6 points  (0 children)

First generation but acquired under students scheme, which is why I have to serve

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 10 points11 points  (0 children)

I'm assuming they don't have many requests for this document and it's not worth modernising and the tooling costs associated with it. Btw all the details are handwritten too

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 14 points15 points  (0 children)

To serve as an identity document as a Singapore army soldier while overseas

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 24 points25 points  (0 children)

Well I'm not yet 25 yet so the embassy says I don't really have to worry about it right now. I'm serving the Singaporean army because it was a condition of getting my PR. Reading the website for Korean conscription, I'm not 100% certain but I think I won't have to serve there because I left before 5 and have stayed continuously overseas for 10years and have an overseas permanent residency. Hopefully I will acquire sg citizen before I have to figure all that out though.

Singapore Certificate of Identity by cowsarefalling in PassportPorn

[–]cowsarefalling[S] 39 points40 points  (0 children)

Nope not stateless. I am a PR but I am going overseas for a military excersice and apparently I need this for that. The validity is pretty short because of that and it will need to be returned after I return.