| 
									
										
										
										
											2023-06-16 16:47:32 +07:00
										 |  |  | set(MCU_VARIANT stm32h743xx)
 | 
					
						
							|  |  |  | set(JLINK_DEVICE stm32h743xi)
 | 
					
						
							| 
									
										
										
										
											2024-11-08 22:53:28 +07:00
										 |  |  | #set(JLINK_OPTION "-USB jtrace")
 | 
					
						
							| 
									
										
										
										
											2023-06-16 16:47:32 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/../../linker/${MCU_VARIANT}_flash.ld)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-07 15:04:19 +07:00
										 |  |  | set(RHPORT_SPEED OPT_MODE_FULL_SPEED OPT_MODE_HIGH_SPEED)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # device default to PORT 1 High Speed
 | 
					
						
							|  |  |  | if (NOT DEFINED RHPORT_DEVICE)
 | 
					
						
							|  |  |  |   set(RHPORT_DEVICE 1)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | if (NOT DEFINED RHPORT_HOST)
 | 
					
						
							|  |  |  |   set(RHPORT_HOST 0)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-16 16:47:32 +07:00
										 |  |  | function(update_board TARGET)
 | 
					
						
							| 
									
										
										
										
											2024-11-07 15:04:19 +07:00
										 |  |  |   target_sources(${TARGET} PUBLIC | 
					
						
							|  |  |  |     ${ST_MFXSTM32L152}/mfxstm32l152.c
 | 
					
						
							|  |  |  |     ${ST_MFXSTM32L152}/mfxstm32l152_reg.c
 | 
					
						
							|  |  |  |     )
 | 
					
						
							|  |  |  |   target_include_directories(${TARGET} PUBLIC | 
					
						
							|  |  |  |     ${ST_MFXSTM32L152}
 | 
					
						
							|  |  |  |     )
 | 
					
						
							| 
									
										
										
										
											2023-06-16 16:47:32 +07:00
										 |  |  |   target_compile_definitions(${TARGET} PUBLIC | 
					
						
							|  |  |  |     STM32H743xx
 | 
					
						
							|  |  |  |     HSE_VALUE=25000000
 | 
					
						
							|  |  |  |     )
 | 
					
						
							|  |  |  | endfunction()
 |